The .gif file has to be located somewhere (not on CPF) that is accessable from the web. I use photobucket.com. Upload your picture to your hosting service. Get the URL of your picture (photobucket.com will generate this for you). Highlight the URL and hit ctrl-C to copy it to the clipboard.
When entering a CPF post or PM scroll down to the section labled "Instant UBB Code". Click on "Image". Hit ctrl-V to paste your URL into the form, then hit return. When you preview your post or PM, you see the picture (.gif, .jpg, etc.)
Edit:
Just noticed your avatar. I see you are using imageshack. You must have done this at least once already to get your avatar to show.