The penalty clock keeps track of how long a team is short-handed. When the penalty clock expires, the player comes back on the ice and their team returns to full-strength.
For example, in the image above the orange team with four skaters and one goalie is short-handed. The purple team with five skaters and one goalie is at full-strength and on a power play.
A hockey team must have at least three skaters and one goalie on the ice. If a goal is scored while a team is short-handed, the player is allowed to leave the penalty box and return to the ice.
If a goal is scored on a power play, then the team that is short-handed is returned to full-strength. This means the player in the penalty box can return to the game.
Yes, both teams can be down a player on the ice. It is possible for both teams to have three skaters and one goalie as well.