You learn riding at level 40 from the trainer of your race, and your first mount is free. Here are the costs, the free mount quests and every riding trainer with coordinates.
You learn riding in World of Warcraft: Forever from the riding trainer of your race. Apprentice Riding unlocks at level 40 for 100 gold and lets you ride mounts with 60% speed, and your first mount costs nothing.
At level 60 you can learn Journeyman Riding for 1,000 gold, which unlocks the swift mounts with 100% speed. There are no flying mounts in the game:

Every race has its own riding skill, such as Horse Riding for Humans or Raptor Riding for Trolls. You get the skill of your own race together with Apprentice Riding.
This table shows both riding skills, what they cost and what the mounts cost afterwards:
| Riding Skill | Level | Mount Speed | Cost | At Honored | Mounts |
|---|---|---|---|---|---|
| Apprentice Riding | 40 | 60% | 100 gold | 90 gold | First one free, then 20 gold |
| Journeyman Riding | 60 | 100% | 1,000 gold | 900 gold | 200 gold each |
The 10% discount counts at Honored with the faction of your own race, such as Stormwind for Humans or Orgrimmar for Orcs. The Skyborne get the same discount with their own faction.
Mounts also get cheaper with the Bartering perk of the Legacy system, which lowers prices at every vendor by 10%. It does not lower the price of riding training, though:

Bartering is bought with Legacy Points, and the Legacy System Guide shows how to earn them on every character of your account.
At level 40 the riding trainer of your race offers the quest "Learning to Ride". The quest leads you to the mount vendor right next to the trainer, who then lets you pick one mount for free:

Every race has its own version of the second quest, with three or four mounts to pick from:
| Race | Quest | Pick One Of |
|---|---|---|
| Human | Your First Horse | Brown Horse, Chestnut Mare, Pinto Horse |
| Human (Unger Statforth) | Your First Horse | The same, plus the Black Stallion |
| Dwarf | Your First Riding Ram | Gray Ram, Brown Ram, White Ram |
| Night Elf | Your First Feline Friend | Striped Frostsaber, Striped Nightsaber, Spotted Frostsaber, Striped Dawnsaber |
| Gnome | Your First Mechanostrider | Red, Blue, Green or Unpainted Mechanostrider |
| Skyborne | Your First Riding Galestrider | Umber, Stormy or Empyrean Galestrider |
| Orc | Your First Riding Wolf | Brown, Dire, Timber or Black Wolf |
| Undead | A Steed in Death as They Were in Life | Red, Brown, Blue or Black Skeletal Horse |
| Tauren | Your First Riding Kodo | Gray, Brown or White Kodo |
| Tauren (Tylana Clawhoof) | Your First Riding Kodo | The same, plus the Lavender Kodo |
| Troll | Your First Riding Raptor | Emerald, Turquoise or Violet Raptor |
Humans can take the Black Stallion for free from Unger Statforth in Menethil Harbor, and Tauren the Lavender Kodo from Tylana Clawhoof in the Stonetalon Mountains. Pick up the free quest there instead of at the vendor next to your trainer.

After the free one, every other color of your race costs 20 gold. Mounts you own are shared by all your characters on the account.
Each race has a riding trainer and a mount vendor near its capital, almost always standing side by side:
| Race | Riding Skill | Trainer | Mount Vendor | Location |
|---|---|---|---|---|
| Human | Horse Riding | Randal Hunter, /way 84.2 65.0 | Katie Hunter, /way 84.0 65.4 | Eastvale Logging Camp, Elwynn Forest |
| Human | Horse Riding | None | Unger Statforth, /way 8.6 54.6 | Menethil Harbor, Wetlands |
| Dwarf | Ram Riding | Ultham Ironhorn, /way 63.8 50.2 | Veron Amberstill, /way 63.6 50.6 | Amberstill Ranch, Dun Morogh |
| Night Elf | Tiger Riding | Jartsam, /way 38.6 16.0 | Lelanai, /way 38.6 15.6 | Darnassus |
| Gnome | Mechanostrider Piloting | Binjy Featherwhistle, /way 49.2 48.0 | Milli Featherwhistle, /way 49.2 48.0 | Steelgrill's Depot, Dun Morogh |
| Skyborne | Galestrider Riding | Genn Fairweather, /way 53.8 81.2 | Genn Fairweather | West of Valanaar, Zephras Isle |
| Orc | Wolf Riding | Kildar, /way 69.2 13.2 | Ogunaro Wolfrunner, /way 69.4 12.4 | Valley of Honor, Orgrimmar |
| Undead | Undead Horsemanship | Velma Warnam, /way 60.0 52.6 | Zachariah Post, /way 59.8 52.6 | Brill, Tirisfal Glades |
| Tauren | Kodo Riding | Kar Stormsinger, /way 46.8 61.8 | Harb Clawhoof, /way 46.6 62.0 | Bloodhoof Village, Mulgore |
| Tauren | Kodo Riding | None | Tylana Clawhoof, /way 46.0 59.8 | Stonetalon Mountains |
| Troll | Raptor Riding | Xar'Ti, /way 55.2 75.6 | Zjolnir, /way 55.2 75.6 | Sen'jin Village, Durotar |
Humans find both at the Eastvale Logging Camp in the east of Elwynn Forest:

Orcs train in the Valley of Honor in Orgrimmar, where Kildar and Ogunaro Wolfrunner stand in the north of the valley:

The Skyborne train and buy their Galestriders from one NPC, Genn Fairweather, west of Valanaar on Zephras Isle. Skyborne of both factions use him:

Every mount a vendor sells, with its price, is in the guide for that mount family:
At level 60 you go back to the same trainer for Journeyman Riding. It costs 1,000 gold, or 900 gold at Honored, and raises your mount speed to 100%:

Swift mounts come from the same vendors for 200 gold each, and there is no free swift mount for most races. The Skyborne are the exception, since they get a swift Galestrider through the quest "An Epic Ride".

Note: Save up early. Training and one swift mount cost 1,200 gold together, or 1,080 gold with Honored and Bartering.
You can ride the mounts of another race once you are Exalted with that race's faction. You also need its riding skill, such as Tiger Riding for a Human, which costs 100 gold at that race's riding trainer.
Your own race's skill is the only one that comes free. Without that skill you cannot ride the mounts of that race.
Paladins and Warlocks get class mounts from class quests at level 40 and 60, and those quests also teach them riding. Warlocks learn Apprentice Riding together with Summon Felsteed, as shown in How To Get The Felsteed And Dreadsteed As Warlock.
The level 60 class quests teach Journeyman Riding too, so Paladins and Warlocks can ride every swift mount without paying 1,000 gold. The Paladin quests are in How To Get The Warhorse Mount As Paladin and How To Get The Charger Mount As Paladin.