You need nine to ten feet of space around your feeder. A clear plastic dome above the feeder may help keep squirrels away. If they jump down on the feeder from a tree or roof, the dome will cause them to slide off. If your feeder is on a pole, a barrier just below the feeder might help as well. Some bird feeders are enclosed in a cage.
Birds can enter, but the holes are too small for the squirrels.
We have also heard that seed treated with hot pepper may discourage squirrels. Since birds cannot taste the pepper, they are not affected. If your feeders are suspended from a wire, place tubes around the wire. These will rotate as the squirrels try to crawl out to the birdseed and the squirrels will fall off. Some folks revert to greasing the pole holding the feeder.