
Using a foam roller doesn't guarantee you'll reduce pain and/or improve mobility.
When the roller pushes into an area of the body, it's going to create a compression.
So if your hamstring hurts, and you lay the roller directly on the affected area, you are actually pushing the fluid out of that space.
Picture pushing down on a tube of toothpaste, when you push down on it, the toothpaste moves away from your hand.

Really what we want to do with the foam roller, is to send the fluid to the affected area.
So in practice you'll want to slowly roll with pressure towards the painful of stiff area, stop right before it, and then come back fast without pressure.
Watch the original training video (opens in a new tab)
This video above would be a strategy to send fluid to the knee joint. Because you are rolling in this direction, this would help decrease the muscle activity in the vastus lateralis or your outer quad muscle.
Reducing muscle activity is a great way to help change the shape of bones and joint to help us recapture relative motions. These motions help us use more different movement options inside of our base of support to store and release energy with better force distribution.