The preposition У+Genitive has several uses, but all of them denote closeness to the object following it in genitive.
У меня есть машина.
Literally, you could translate this as "Near me there is a car." In this context, the car isn't literally near the person, though. It's just like in English--if you say "I have a gun!" it usually means you have a gun on your person. If you say 'I have a house' it doesn't imply physical closeness but rather ownership. I guess that's not an exact explanation of why it works that way, but it was the best I could think of putting the concept into English for you. Possession is usually denoted by adding есть after the у + Gen. construct. But I don't think you should add it if you're describing a descriptive quality or condition you have. The way I've always thought of it in regards to possession is that есть denotes availability. So you can say
У вас есть машина? (Do you have a car?)
but not
У нее есть длинные волосы (a characteristic = She has long hair--you could say this if you remove the есть).
Есть can also be omitted when answering a question--
У вас есть дети? (Do you have kids?)
У меня двое детей. (I have two kids.)
On У in general, it has multiple roles.
In terms of describing nearness to a location, it's somewhat similar to saying в + a place. It's describing the location of something, it just doesn't quite imply that it's in a place.
You also use У with animate nouns to describe being at a person's place. If you say Я был у Ивана it usually doesn't mean "I was near Ivan" but translates to "I was at Ivan's place", as in his home.
You can also use У to describe the origin of something (but not in all contexts, you just have to learn when it's appropriate to use it as you go). So if you said Ребенок украл печенье у бабушки the у бабушки implies that the kid stole the pastry FROM the grandma, not near her.
Disclaimer: I'm not a native speaker.