What is the meaning of Second-in-command?

Somebody ranking next below a commander.

Someone ranking next below the person in charge.

Source: wiktionary.org