To befriend a squirrel you'll have to be insidious. Your efforts will work if the squirrel doesn't have adverse previous experiences with humans. You have seen their unpredictable maneuvers on the ground and have been impressed by their arboreal acrobatics that even a bird can't surpass. Squirrels have cartoon character-like characteristics, so feeding and keeping one as a friend will be the type of show that will make a popular YouTube video.
Pick a squirrel that you can identify easily and that you see regularly. Befriending one is a trust building process that may take several days. So it is important that you can practice these steps on the same squirrel again and again.
Make sure there are no joggers or dogs that will alarm the squirrel. A squirrel is as volatile as a bird. It is important that no activity will disturb your befriending process.
Approach the squirrel calmly, at an angle, up until the distance where it indicates it is about to run away. Stop there.
Bend down on your knees slowly. Keep the squirrel at the edge of your field of view. Looking at it directly may intimidate it.
Communicate with the squirrel. Use a squirrel whistle that you can purchase from a hunting store. Imitate a squirrel call using your mouth if you don't have a whistle. There are many creative ways in which you can use your tongue and the roof of your mouth to make a bird like or squeaky sound.
Take out from your pocket some peanuts or walnuts to feed the squirrel and toss them midway between you and the squirrel, gently. Doing this gently is important so that the squirrel doesn't think that you are trying to hit it. Hopefully, at this point, the squirrel will realize that you are trying to feed it and will respond by coming cautiously towards you.
Decrease the throwing distance of the nuts, progressively. Repeat, until the squirrel can feed directly from your hand.