If a squirrel is approaching you and being friendly, it is likely to be begging for food. They are highly intelligent and sociable animals, and in big cities have learned that humans can sometimes provide food.