The aim is to use the roller (or a tennis ball or even a golf ball if you're tough enough!) to apply pressure to the muscle, in a slow, deliberate rolling motion in order to restore post-workout muscles to their original state; supple, tender, elastic (think about how you might bash a steak to tenderise it!) and ready to perform at a moments notice. The more it hurts the more you probably need it! With the roller you might have to contort yourself into a few strange positions to reach the part you want to. Now I'm not a massive fan of home-made exercise videos with step-by-step guides on what to do, for fear of promoting bad practice by the reader, but feel free to do a google browse (type in Foam Roller Exercises) for some exercises to try yourself. Reputable sites to try are running publications like Runners World. Just ensure you are rolling muscles and NOT over joints e.g the knee joint if you are rolling your hamstrings.
I use a high density EPP Foam Roller from Fitness Mad. It's 90cm long so good for Pilates and massage, but if you're only going to use it for the latter, you can get shorter rollers, and even versions with knobbles on which are amazing! (if you like that kind of thing). I do recall a teacher of mine telling me about a chrome roller (that's not a typo!) with a casing that goes into the freezer...hmmm..!!