What are the restrictions on taking screenshots from Stack Exchange that I want to post on my blog?
The Terms of Service have a complete section about it (6. Content Permissions, Restrictions, and Creative Commons Licensing). In short, the TOS states that the content provided by the users is available under the CC BY-SA license and all the rest of the page is owned by Stack Overflow Inc. and may not be copied except for personal, non-commercial use and no derived works may be created.
It could be argued that a screenshot is a derived work, so then you would not be able to use a screenshot, unless
- you have (written) permission from Stack Overflow Inc. to use their copyrighted material in that way. Or...
- your creation and usage of the screenshot fall under permissible use under copyright law (e.g. fair use).
Besides that, you need to comply with the terms of the CC BY-SA license with regard to the displayed user content.