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 a config.rb
file, set up such that Compass is ready to go!
Enjoy!