<iframe> to your page which shows the button, and clicking the button pops up a special UI for sharing content there. A Twitter Share button, as I write, adds about 50k of weight and 8 requests to a page.
They also offer another way, a simple URL format, which requires no additional resources at all:
Much nicer, really.
DEV has just announced the same functionality. DEV is a nice community of developers writing about all sorts of tech topics. If you’d like to write about a Pen you’ve created here on CodePen, or at least use it as a starting point to start writing a post and have it embedded there, you’ll find a new Share on DEV link in the sharing menu in the footer:
That’ll pop you over there with a draft post kicked off:
Of course, there is nothing stopping you from cross-posting the stuff you like, say, to your own blog or here on CodePen.