First, let me go off topic a bit: You may be interested in the introduction about using Latex:
http://web.mit.edu/rsi/www/pdfs/advmath.pdf
Now let me start the topic:
A useful discussion can be find here:
http://tex.stackexchange.com/questions/8625/force-figure-placement-in-text
The most useful thing in the above discussion is a picture. In case you may have trouble to access the contents in the above link, I attached the picture below. it was posted by Danie Els at the above link.