Trains have tires too, though it might not be too obvious to the casual observer. Yes, there are rubber-tired Metros in the world that run on rubber tires yet follow a track - the Paris Metro, the Montreal one, the Washington DC - but that's not what I'm talking about here.
Efficient though the rolling of steel wheel on steel rail is, wear still takes place - on acceleration, on braking, and on cornering. Therefore, slowly, the wheels on a train wear down. The wearing down is one problem; but also, a wheel that wears begins to deviate from the correct profile. The shape of a train wheel is designed and specified precisely for the best possible riding and cornering characteristics, and too much wear can alter that. Wear can also take place unevenly if wheels lock up under heavy braking, causing flat spots as the stationary wheel locks up and slides.
Another, different form of damage to a train's wheels takes place if violent wheelslip occurs. The friction so caused can heat the wheel (and rail) enough to cause permanent heat damage.
Replacing a whole wheel because of a worn contact surface proves expensive, so the concept of fitting steel tires to train wheels came about. The tire is a hoop of steel that's fitted around the steel or iron wheel. No obvious form of fastening is generally used to attach it. Instead, the tire is held by an interference fit - it's made slightly smaller than the wheel on which it is supposed to fit. To fit a tire, it's heated up until it's glowing hot. Railroad workshops generally have special equipment to do so. As the tire heats, it expands until it's big enough to fit around the wheel. After placing it on the wheel, the tire is cooled, and it shrink fits onto the wheel. When cold, the tire won't budge even under quite extreme forces.
Removing a tire is done in reverse - the tire is heated while on the wheel until it loosens.
Tires are reasonably thick, up to about an inch thick or more, giving plenty of room to wear. If a tire wears out of shape, or gets flat-spotted, but has a reasonable amount of metal left, it can be turned on a wheel lathe to refinish it, reshaping it to the correct profile.