They eat our food. They furnish their nests with our detritus. They chew through our sheet metal, our lead pipes and our concrete. They outsmart us at every turn. They are our shadow, our enemy, our next door neighbor. — "Rat City!" Spy magazine, 1988
A rat's ribs are hinged at the spine enabling them to squeeze through the tightest spaces - like the drainage pipe of your toilet. And rats are apparently amazing swimmers too; they can hold their breath up to three minutes.
Watch this video that explains how a rat can go from the city streets to your bathroom.