Castle early and often (or not) !
Castling, bringing the king out of the center and into safety, and activating the passive rook, is often an important part of chess. Beginning chess players are told to castle early.
Some people overdo it though. In this game from the Tim Krabbe record collection, the players castled 3 (!) times in 1 game :
Tim Krabbe records ->Moves ->Greatest number of castlings 
Castling early and often is a good rule of thumb. But there are .. (tada ! - insert trumpet sounds -) of course exceptions.
For example, castling too early in some French defense positions might confront you with the Greek gift bishop sacrifice.
Here in a miniature game by Greco (know your classics, study Greco material! ).
Here another by Blackburne :
As said, there are exceptions.
Here a "custom" castling game :
In some other games, the king can simply stay in the middle.
That can occur in Sicilian defense, Najdorf variation.
In a fresh game I just played, I was too busy moving pawns and pieces, and thinking about a good plan to try to get and advantage and win. My king didn't bother, it happily stayed in the middle the whole game.
 The weblink would not load correctly, maybe because of the # and the spaces, and the game seems to have been removed from chessgames.com