In CodePen, you can export any Pen as a .zip archive. It will contain everything in your Pen: an index.html file, stylesheet(s), and JavaScript file(s). Even external resources will be linked up. You should be able to open that index.html file in your local browser and it will look exactly as it does on CodePen.

As of now, if you download a file that uses Sass with Compass or SCSS with Compass, the folder will also include an config.rb file, set up such that Compass is ready to go!

compass-export

Here is a short video about exporting Pens from CodePen that covers this:

Enjoy!