A water heater anode rod sits inside the water heater where it contacts the water. They will be located at the top of the tank (where they can be serviced).
To find the location takes a little sleuthing. You will need to get access to the top of the water heater, which for some people might mean removing any extra insulation you have added. You might see a large nut at the top of the tank. You will need a deep socket ratchet to remove it, and it’s going to take some elbow grease.
Realize that the job of the anode rod is to sacrifice itself, so over time it erodes into nothing. So, you might remove the nut expecting to pull out a beautiful rod but all you see is a little piece of wire or a nub and think that it isn’t the anode rod. It was the anode rod and your timing to replace it couldn’t be better.
You might have to do some digging too. It may be under a plastic disc, or under fiberglass. It may even be under the cover of the tank, which will require you to remove the top cover to expose it. Finally, you may have a combination nipple/anode rod where the outgoing nipple has the anode rod attached to the bottom of it.