What's actually happening
Your attic fan should be roaring on a hot afternoon, and instead the attic feels like an oven with no relief. Either the fan isn't running, or it's spinning without moving air.
Those are two different problems, and the fix depends on which one you've got.
If the blade isn't turning, you're looking at a power, thermostat, capacitor, or motor issue. If the blade turns but no air comes out, the airflow path is blocked somewhere.
The fastest first test: on a hot day, turn the thermostat to its lowest setting and watch the fan. Then step outside and feel for exhaust air at the shutter or roof vent.
That one test tells you which branch you're on before you climb into a 140°F attic and start pulling covers off things.
The usual suspects, ranked
In the field, the order of failures is pretty predictable, and it's usually not the motor.
The thermostat is the number one cause. These snap-disc controls sit in the hottest part of the house all summer and drift or die. A $15 to $30 part fixes a lot of "dead" fans.
Next is the capacitor. If your motor uses one, heat degrades it, and you'll get a hum with slow or no spin. Also cheap, if you know how to discharge it safely.
Blocked soffit vents are the quiet killer. The fan runs perfectly, but there's no makeup air, so it moves a fraction of its rated CFM. People chase the motor for weeks when the real problem is insulation stuffed against the eaves.
On older belt-drive units, the belt dry-rots and snaps. Motor hums along, blade sits still.
The motor itself is usually last. When it goes, it's typically after 10 to 15 years of hard summer duty.