Some people take the purchase and care of small critters lightly, when really we ought to put just as much effort into their care as we would with a cat or dog. Rats are most certainly not an exception. Pet rats are just as intelligent, and in some cases, even more so, than cats or dogs, and they require the same amount of care.
The most important thing that you need to keep in mind before making your decision is that rats must be kept in pairs or groups. They are social creatures, and even with hours of human attention daily, they will get lonely without a friend. It's highly recommended that you start with a pair of rats, as they require less space and are easier to care for than a group. Unless you neuter or spay your rats, they should be kept in pairs or groups of the same sex to avoid unwanted pregnancies.
Rats are incredibly intelligent despite their tiny size. They are intuitive, curious creatures who love to explore and play. Be prepared to share your life with these critters whose intelligence is higher than most dogs. You should spend at least 20 minutes a day playing with them outside their cage. Even if they are simply riding on your shoulder or hiding in the pocket of a hooded sweatshirt, they will appreciate the change of scenery and the human contact. Rats become very attached to their owners, so remember to give them all the love and attention you can afford to keep them happy and healthy.
Rats are chewers. Like all rodents, their teeth are constantly growing so they chew things to wear them down. Anything inside or near their cage will be chewed. I've learned this lesson the hard way with my rats. They destroyed my favorite sweater when it was thrown too close to their cage, and I hadn't noticed until it was too late. Supply your rats with wooden chew toys to help keep them amused and to keep their teeth in check.
Despite what the package might say, most cages sold in pet stores for rats are too small. It's difficult to find a decent cage, because if the cage itself is large enough, often times the bars are set far too wide apart and the rats can squeeze through and escape. Be sure to get the largest possible cage while maintaining a narrow distance between the bars so as to prevent escapes. Here's an example to give you an idea of what's too big or two small―ten-gallon aquariums are much too small for two rats, but when topped with a wire cage expansion (these are hard to find, but make great rat cages!), there's just enough space for two rats to share comfortably.
Proper nutrition is essential for any living creature, including a rat. There are some pet stores that sell 'gourmet rat food', that includes seeds, nuts, and pellets. Avoid these food mixes at all costs. Your rats will not be getting the nutrition that they need from this. They'll also get very fat. I recommend basic lab blocks, as they supply your rat with a balanced diet without being outrageously expensive.
The average lifespan of a rat is two to three years. This isn't very long, and often towards the end of their lives, pet rats get large tumors that can restrict their movement. If a rat looks as if it's in pain or its movement is heavily restricted by a large tumor, it requires the same medical attention you would give to a cat or a dog. Just because they are inexpensive pets, does not mean they are disposable or feel less pain. Make sure you are able to afford a potential visit to the vet, because more than likely within your rats' lifetimes, they will need to see a vet at least once.
Lastly, as with any pet, consider adoption first before running to a pet store. Shelters are full of pet rats these days that are in need of homes. These shelter rats make excellent pets, and throughout their lives, you can feel proud that you rescued these homeless animals.