It's very situational. All I can say is when the mood dictates it. Usually when the queens and some minor pieces are off. Sometimes the king needs to stay behind to protect a pawn if the opponent has an active enough rook. Calculate exchanges, and if they get first king move then they'll have a king activity advantage. It's all too general though and actual games will have many more factors such as who has what exploitable weakness, how to force a weakness on the other side, find a way to exchange inferior for superior piece, etc.
when to bring the king in to play

To be very general, when it wont be in danger. Just queens off isn't really enough if there are a lot of open lines which the opponents bishops or rooks can take advantage of. You should learn pretty quickly with experience, I don't think there are any real rules.
When should I begin moving him towards the center? After the queens are gone? After a certain number of pieces are captured?