Standard uses only cards from the most recent sets. Because a new set enters Standard every three months, and four sets leave every year, the landscape of Standard is constantly changing.
Modern was initially designed as a format where people could use their cards that had just rotated out of Standard. Modern's card pool includes all cards that were legal in Standard since Mirrodin and 8th Edition, as well as Modern Horizons.
Sometimes called Elder Dragon Highlander (EDH), Commander is a format where you have a legendary creature (your commander) at the head of a 100-card deck based around it. All the cards in the deck must have the same "color identity" as the commander and you can only play one copy of each card (except basic lands). The format is also multiplayer as opposed to 1 vs. 1 and you start with 40 life, making this format radically different from other Magic: the Gathering formats.
Also called "french Duel Commander", Duel Commander is a 1 vs. 1 variant of the Commander format. As in Commander, you have a legendary creature (your commander) at the head of a 100-card deck based around it. All the cards in the deck must have the same "color identity" as the commander and you can only play one copy of each card (except basic lands). But unlike in Commander, you only have 20 starting life. In tournaments you can also "swap" your commander after game 1 and 2 of your match, but all matches start with your pre-selected commander.
In addition to the banned cards listed below there are some cards that cannot be used as the commander, which you can find in the official banlist.
Similar to Commander, Oathbreaker decks are made up of 58 cards plus two cards in the command zone: a planeswalker (the Oathbreaker) and an instant/sorcery that can only be cast if the Oathbreaker is on the battlefield.
Pioneer is the newest MTG format. Like Modern before it, Pioneer was designed as a place for decks to be used after they rotate out of Standard. It includes all main sets since Return to Ravnica.
Legacy's card pool stretches back to the beginning of Magic: the Gathering.
All cards are legal in this format (with only a few exceptions). Many cards are instead restricted meaning only one copy is allowed. Because of the deck-building freedom, the decks here tend to be the most powerful you can find, and also the most expensive.