Here is the setup that I use to keep squirrels out of my bird feeders.
This is the link to the original post that describes the setup in more detail.
In general the process requires a multi pronged approach to combating squirrels. You will need to start with a high quality squirrel proof bird feeder. That being said, no feeder is really squirrel proof so there are extra steps you need to take in order for this to really work.
You will need to add a baffle to the feeder, hang it far away enough from the tree and fill it with a type of bird seed that squirrels do not like. Finally you will need to put up a squirrel feeder in a nearby location and fill it with a cheap feed such as corn.
Make the feeder hard to access, fill it with something squirrels don't like and then give the squirrels an easy way to eat something they do like! Works like a charm!!