A lot of posts and answers on blender.stackexchange have nifty animated screen captures to show where/how to select various options, or to show "live" examples of problems one is facing in blender. How does one record and upload an animated screen shot to post to stackexchange? (i.e., to capture cursor movements, mouseclicks, etc)
To record videos of your screen, you will need some screen capture software.
I use one called CamStudio. It's very basic and doesn't have many options, but it does what I need and costs nothing. It creates AVI videos.
When you create a question or answer, the toolbar at the top of the text editor has an Image button. If you convert your video to an animated GIF, the Image button should accept it, but note that there is a file size limit, so don't think about adding long videos.
If you want a longer video, upload it to YouTube (or other video site) and include a link to it in your post.