A screen shot of the current capture of your video card, or a screen shot of your programs current state?
If it's the latter, then you just need to pull the current screen surface or render capture, copy it to a buffer, convert to whatever format you want with the tools provided by the API you're working with (Open[el/al/gl], direct3d, sdl, etc etc) then write it to a file.
If it's the former, you would probably need to use a OS or driver specific api to intercept the current frame. for windows, you could look through the msdn.
P.S. I'm not very experienced in this kind of thing, this is just my theory and figured I'd share since there's no other post.