I did a quick write up on axle standards so more posters can understand how they work and what they would need if they plan on changing their fork or wheels. There are more standards out there than just the ones I've listed, but this will cover the most common ones. I also didn't cover road bike spacing because that adds unnecessary complexity.
On wheels you can't change the axle type your fork uses without replacing the lowers, or replacing the fork altogether. On rear wheels, you need to make sure your frame and wheels are compatible. Many hubs are convertible to different axle types using various adapters.
Maybe this thread will get stickied so more posters see it.
FRONT WHEELS
20mm Thru Axle: Unlike traditional hubs, in a 20mm thru axle hub the 20mm diameter axle is actually part of the fork. It typically slides through one fork leg, through the hub and into the other fork leg. Width on a 20mm hub is 110mm.
15mm Thru Axle: A 15mm thru axle hub is almost identical to a 20mm hub except the axle is 15mm diameter and the width is narrower at 100mm.
9mm QR: A traditional front hub uses a 9mm diameter hollow axle with a 5mm diameter quick release skewer. Forks that accept this type of hub are called "open dropout." The axle is part of the hub The axle slots into the fork dropout from the bottom and the quick release is used to clamp it in place. Spacing is 100mm.
REAR WHEELS
142 x 12: 142 x 12 thru axles are all the rage now. Spacing on these is 142mm wide with an axle diameter of 12mm. They essentially operate the same as front thru axles, on the rear of the bike. Thru axles make the bike stiffer which reduces lateral flex and results in better tracking especially through corners and at speed.
135 x 12: Before 142mm width hubs became the norm, some manufacturers used the 12mm thru axle with a 135mm width. This is not very common on new bikes, as it's been replaced by 142. You can read about the reason for the change here: Syntace
135 x 10: The long time standard for rear hubs was 135mm width with a 10mm diameter hollow axle and a 5mm quick release. Again, the axle is part of the hub. This works on frames with open dropouts only. Many bikes sold still use frames with open dropouts.
In order to stiffen open dropout bikes, some hub makers have introduced hubs with 135mm spacing, but with a removable 10mm axle that combines the skewer and axle into one unit. The DT Swiss RWS skewer is a prime example.
On a similar note, some hub manufacturers offer axle conversion kits that replace the stock axle with one that uses bolts instead of a quick release, like Easton Havoc wheels, or Chris King fun bolts.
150 x 12, 157x12 Most downhill bikes use wider hub spacing for a stronger wheel build. 150mm width with a 12mm axle is most common. Many newer DH bikes use 157mm spacing with a 12mm axle. The difference is akin to 135 vs. 142.
Bolt on: Bolt on axles are found on many department store bikes, but aren't very common on mountain bikes. A bolt on axle replaces the hollow axle in a traditional-style hub with a longer, solid axle and uses nuts on either end to clamp it in the dropouts. Spacing remains 100mm on front hubs and 135mm on rear ones.
On wheels you can't change the axle type your fork uses without replacing the lowers, or replacing the fork altogether. On rear wheels, you need to make sure your frame and wheels are compatible. Many hubs are convertible to different axle types using various adapters.
Maybe this thread will get stickied so more posters see it.
FRONT WHEELS
20mm Thru Axle: Unlike traditional hubs, in a 20mm thru axle hub the 20mm diameter axle is actually part of the fork. It typically slides through one fork leg, through the hub and into the other fork leg. Width on a 20mm hub is 110mm.
15mm Thru Axle: A 15mm thru axle hub is almost identical to a 20mm hub except the axle is 15mm diameter and the width is narrower at 100mm.
9mm QR: A traditional front hub uses a 9mm diameter hollow axle with a 5mm diameter quick release skewer. Forks that accept this type of hub are called "open dropout." The axle is part of the hub The axle slots into the fork dropout from the bottom and the quick release is used to clamp it in place. Spacing is 100mm.
REAR WHEELS
142 x 12: 142 x 12 thru axles are all the rage now. Spacing on these is 142mm wide with an axle diameter of 12mm. They essentially operate the same as front thru axles, on the rear of the bike. Thru axles make the bike stiffer which reduces lateral flex and results in better tracking especially through corners and at speed.
135 x 12: Before 142mm width hubs became the norm, some manufacturers used the 12mm thru axle with a 135mm width. This is not very common on new bikes, as it's been replaced by 142. You can read about the reason for the change here: Syntace
135 x 10: The long time standard for rear hubs was 135mm width with a 10mm diameter hollow axle and a 5mm quick release. Again, the axle is part of the hub. This works on frames with open dropouts only. Many bikes sold still use frames with open dropouts.
In order to stiffen open dropout bikes, some hub makers have introduced hubs with 135mm spacing, but with a removable 10mm axle that combines the skewer and axle into one unit. The DT Swiss RWS skewer is a prime example.
On a similar note, some hub manufacturers offer axle conversion kits that replace the stock axle with one that uses bolts instead of a quick release, like Easton Havoc wheels, or Chris King fun bolts.
150 x 12, 157x12 Most downhill bikes use wider hub spacing for a stronger wheel build. 150mm width with a 12mm axle is most common. Many newer DH bikes use 157mm spacing with a 12mm axle. The difference is akin to 135 vs. 142.
Bolt on: Bolt on axles are found on many department store bikes, but aren't very common on mountain bikes. A bolt on axle replaces the hollow axle in a traditional-style hub with a longer, solid axle and uses nuts on either end to clamp it in the dropouts. Spacing remains 100mm on front hubs and 135mm on rear ones.