Mashing is the process of steeping crushed grain in hot water — typically 145-158°F (63-70°C) — so enzymes naturally present in malted grain convert its starch into fermentable and unfermentable sugars. This single step determines more about a finished beer's fermentability than almost anything downstream of it.
The temperature you pick sets the sugar profile, not just "doneness"
A lower mash temperature (toward 145-149°F/63-65°C) favors an enzyme, beta-amylase, that produces more fully fermentable sugar, pushing finished attenuation higher and body lower. A higher mash temperature (toward 154-158°F/68-70°C) favors alpha-amylase instead, leaving more unfermentable dextrin behind and producing a fuller-bodied, less-attenuated beer at the same starting gravity. This is the actual mechanism behind why two batches with identical grain bills can finish at noticeably different final gravities — see what attenuation should I expect from my yeast for how mash temperature and yeast strain interact.
Single-infusion versus multi-step mashing
Most homebrewers use a single-infusion mash — one strike-water addition, one rest temperature — because it's simpler and works fine for well-modified modern malt. Step mashing (multiple rests at rising temperatures) and decoction mashing (pulling and boiling a portion of the mash) are older, more involved techniques still used deliberately for specific traditional styles, both covered on their own reference pages.