Rats in D&D include a wide variety of small rodents, from field mice to great sewer rats. They share one basic quality: by themselves, they aren't much more than faintly clever, light-averse mammals. However, they are prolific breeders, and can subsist on nearly any organic material. These two qualities combine to create vast swarms of rats that inhabit the refuse pits and sewers of great cities, subsisting on the detritus of society, and infesting urban centers in an uncanny parallel to the people above.
Rats are highly adaptable, great climbers and swimmers, able to eat almost anything, and proflic breeders. They also tend to be carriers of disease and plague.
Rats generally aren't much of a threat by themselves, but they gather in swarms, and those swarms can be quite dangerous, killing with one thousand little bites and tears to sensitive and vulnerable areas of the body.
The swarms can be more effectively faught with area-effect abilities such as fire, than with individual weapon attacks.
Individual rats may serve as familiars to arcanists. They grant their masters a bonus to Fortitude checks, as their hardiness and resilience aids their masters as well.
Kobolds are well known for employing rats and other vermin in their lairs and traps.