If you're replacing a toilet tank that is less than five years old and you stick with the same brand, the tanks should be interchangeable. Toilets from the same manufacturer mainly vary in the bowl style and height. Within the same brand, tanks vary in water capacity and size, but complete style changes in tanks happen only every few years.
It is unlikely that tanks will be interchangeable if you replace a toilet tank with one from a different manufacturer. Problems with mismatched tanks and bowls include hardware not lining up and poor balance on the bowl. Even if the bolts line up, the new tank may leak or be wobbly.
Toilet tanks older than 5 years are rarely interchangeable with new tanks. The main concern is that the placement and number of holes for the bolts change as designs change. Therefore, a new tank is unlikely to match up to your older bowl. If you have a strong desire to keep the old bowl, ask someone at a plumbing supply store or a home remodeling shop that specializes in older or used equipment if they can help you find a tank that will work with your bowl.
Buying a complete toilet set relieves some of the guess work and may not cost much more than replacing only the tank. However, if you choose to replace just your tank, take the toilet apart and take the tank with you to the hardware store. This ensures you'll find a tank that matches the hardware on your bowl and is the same color as the old tank.