Before anyone opens an attic hatch, three questions usually narrow the species down to one or two candidates: what time of day do you hear it, what does the sound actually do, and where in the structure is it.
Getting this right matters more than it sounds. The removal method for a squirrel and the removal method for a bat have nothing in common, and treating one as the other wastes a fortnight.
Time of day does most of the work
Daytime scratching, especially early morning and late afternoon, means squirrels. They are the only common attic invader that keeps human hours.
Noise that starts at dusk and wakes you at 2am means raccoons, opossums or rats. Raccoons are unmistakably heavy. Rats are fast and light.
Activity concentrated in a narrow window right at sunset, with the sound coming from the roof line rather than the attic floor, points to bats leaving to feed.
What the sound is doing
Rolling and dragging: squirrels moving nuts, or a raccoon shifting insulation. Squirrels sound like a marble rolling. Raccoons sound like furniture.
Fast scurrying with sudden stops: rodents. Rats favour the same routes nightly, so the sound tends to repeat along one line.
Scratching that seems to be inside a wall rather than overhead: an animal that fell down a cavity, or bats in a void. If it stops after a few days and a smell follows, something is stuck.
Chittering, growling or crying: raccoon kits. That sound means a mother is present, and it changes the whole approach.
Where the sound is
Directly overhead in the attic floor: squirrels, rats, raccoons. Near the ridge or high in the gable: bats, sometimes squirrels. Inside a wall at floor level: mice, or something that has fallen.
Under the floor or from a crawl space vent: opossums, skunks, groundhogs, snakes. Those are ground-level problems and need a different inspection entirely.
In a chimney: raccoons and chimney swifts most often. A raccoon in a chimney is very commonly a mother with kits, because a flue is a near-perfect den.
Other evidence worth checking
Look at the gutters and the roof edge from the ground with binoculars. Nut shells, torn soffit returns, staining around a gap and worn entry holes are all visible without a ladder.
Check the attic insulation for compressed runways and latrine areas. Droppings tell you species and roughly how long it has been going on.
Grease marks along a rafter or pipe indicate a route used repeatedly, which is a rodent signature.
What not to do
Do not seal the entry point because the noise has stopped. If anything is still inside, you have created a dead animal problem in a wall cavity.
Do not set traps before you know what you are trapping. The wrong trap catches nothing, or catches the wrong species and creates a legal problem.
Do not go into a confined attic with an active raccoon. A cornered animal in a low space is genuinely dangerous.