in the opening and middlegame, the king will mostly not play an active role in the development of an attacking or position. instead, a player will usually castle and find safety on the edge of the board behind pawns. in the endgame, however, the king may comes out of hiding to play an active role as an offensive piece as well as helping in the promotion of their remaining pawns.