The King moves in straight lines, and can move in eight (8) directions, just like the Queen.
The King can only travel one square each turn.

Diagram 1
So, the King on the “d5” square in diagram 2, could move to any of the GREEN squares.

The King may not move to a square which has a piece of the same color on it.
If a square next to the King (in any direction) has a piece of another color on it, the King may capture that piece by taking its place on that square and removing the piece from the board. (This is called capturing.)

Diagram 3
IMPORTANT RULE:
A King may not move to a square where it could get captured by the other side.