Lands don't pay for spells directly. Instead, lands on the battlefield (both basic and non-basic) tap to produce mana, and that mana is what is used to pay for mana costs of spells and abilities.
Lands vs Mana vs Mana Cost
Lands are a type of permanent that can exist on the battlefield. They are reusable, and you are usually allowed to play one land to the battlefield under your control on each of your turns. Most lands1 have an ability that lets you tap them to produce mana. Lands then untap at the beginning of your turn during the untap step.
Mana is an abstract resource that exists in a player's mana pool. Mana costs are the mana symbols that appear in either the top right corner of a card or before a colon in an ability on a card.
Here is a rough sequence of using Lands and Mana to pay for a cost:
- You tap any number of your lands to produce mana.1, 2
- Mana is added to your Mana Pool.
- You spend mana from your Mana Pool to pay for costs (such as spells and abilities).
For example, when a player taps a Mountain to cast Lightning Bolt, what's actually happening is that the Mountain is being used to add red mana (written as ) to that player's mana pool, and then the in the mana pool is being used to pay the in Lightning Bolt's mana cost.
The reason for the mana pool is that it allows a player to hold mana that they are not spending right away. This matters for many reasons, including using the mana from Rofellos, Llanowar Emissary to pay for multiple things, or use a series of mana generating abilities to get the mana they need for a spell. Examples of cards that need a mana pool to work include: Dark Ritual, Selesnya Signet, and Doubling Cube.
Normally, your mana pool empties at the end of every step and phase of the turn, so any combination of abilities you want to use to generate mana need to be done in the same step/phase.3
(See Where can I find a chart or diagram explaining Magic's turn structure? for more detail on steps and phases.)
1. Some non-basic lands (such as Maze of Ith) do not have mana producing abilities, although due to the confusion these cause, Wizards hasn't printed one since 2010 aside from lands that fetch other lands from your library (such as Evolving Wilds).
2. Lands also aren't the only thing that generate mana. See the section below.
3. If Upwelling (or a similar effect) is on the battlefield, you can hold mana in your mana pool indefinitely.
Non-basic lands actually work pretty similarly to basic lands. The giant white mana symbol on a plains is just shorthand for ": Add ." The older versions of these lands actually said that explicitly. So, the only difference between a Plains and say Coastal Tower is that Coastal Tower lets you add or to your mana pool when you tap it (your choice) whereas a Plains just lets you add when you tap it.
Note that: "Add " is the modern rules text for the older "Add to your mana pool".
Things Besides Lands can Generate Mana
You can get mana from any type of card or permanent, not just lands. There is no difference between the mana generated by Llanowar Elves and that generated by a Forest 4. Any of the main card types can generate mana, as can tokens. Here are some examples:
4. The only mana that is different is mana with a condition on how it can be spent, such as that from the second ability on Corrupted Crossroads.
Basic Land Types
The basic land types of "Plains", "Mountains", "Island", "Swamp", and "Forest" give a land the ability to tap for mana of a particular color. For example, Urborg, Tomb of Yawgmoth adds the "Swamp" type to all lands; this actually allows any land to be tapped to add because the ability ": add " is a property of the Swamp land type.
Thus, basic lands have the ability to tap for mana of their color by merit of being one of the basic land types5. The giant mana symbol on them is actually reminder text, not rules text. Some lands (such as Canopy Vista or Steam Vents) have multiple basic land types and can tap for different varieties of mana. Likewise, they have reminder text emphasizing that the basic land types grant their mana abilities.
5. The exception being Wastes. Wastes has no basic land type, and as a result has to have rules text allowing it to tap for mana. In the case of Wastes, the giant colorless mana symbol is actually a standin for the rules text: " add "