Our three month old boy puppy squats to pee.
Will he eventually learn how to cock his leg by himself?
Is this learned behavior?
Is it common for puppies to be like this?
No concern for this, it's genetic to be honest. There's a myth that goes around saying that once they hit maturity (puberty) they will cock their leg - it's not true, it has nothing to do with testosterone. I've had females cock their legs and males that don't, their method of peeing does not indicate health it's just how they are.
Sometimes they will change their stance throughout the day, one pee they squat the other time they cock their leg.
This is quite normal. My lab is like 1 and a half years old and sometimes he squats while peeing and sometimes he cocks his leg. I guess whatever suits him as per the place. He did not start cocking his leg until he was an year old.
I would say this is not and issue with your dog so, keep showering your love without worries and pet him for me as well.
Perfectly normal, as he matures he will automatically lift his leg when need. And like Rebecca said they will do switch at will to mark the spot they're trying to mark.
I add by answering an unanswered part of your question...
I've seen this as a learned behaviour.
My mother's black kelpie, as a puppy, when he was first introduced into her home, squatted to pee. The puppy learned to cock his leg from her aging red kelpie, either through his own observation or by some other way in which dogs learn from each other.
Also worth mentioning, my male cattle kelpie cross as a puppy squatted and, as he matured (and perhaps as his strength and balance increased), he began more and more to cock his leg to pee.