I have rats :) Quite a few of them

4 boys and 5 girls currently.
As the others have said, rats need to be in pairs or groups preferably. As 70 says, I would always recommend 3 because if there is an accident or something, or if one dies then you don't need to worry about having one loner left.
I have had loners twice, one was a boy who couldn't safely be kept with other rats as he had masses of health/social issues, this is quite rare and if we didn't have working schedules that allowed one of us to be home with him most days I would never have kept him, he was out for at least 5 hours a day having cuddles, sitting in our lap, running around and so on. The second loner was when one of our old boys died last November, our old boy who remained got very depressed and in March we sourced him a friend (and in July they got two more friends!) somehow both of the old boys are still going 
I'd always say that for your first pair/trio you want them from a good, family friendly breeder. You may have to wait on a waiting list for rats from such a breeder. This is because pet shop rats often come from rodent farms, which are Not Nice Places, their lineage is unknown and they often are more prone to health issues and they may be significantly more skittish due to lack of handling. Rescues are wonderful, but for your first rats you don't want to be trying to learn the ropes with rats who have an uncertain history, even babies from rescues can be a bit funny if their parents have taught them 'bad' behaviours. I have had numerous rescues but each one has been a learning curve! I don't regret any of them and love them to bits, but I'm so glad that I got my first two from a breeder! The NFRS has a list of breeders but it's worth checking locally to see if there are family friendly breeders around too who may not be on the NFRS. There's one NFRS breeder I'll never get rats from again, and then another who is now not on the NFRS list (she was though) but she is well known in the rat community in the area we've just moved from and her rats are very lovely, I will be making the 6 hour round trip to get rats from her in future as they're just so squishy and lovely!
Rats need big cages, they prefer height over floor space and a decent sized cage can get expensive. The bare minimum cage would be the Ferplast Jenny, it's the 'token' rat cage that pet shops tend to stock.
You want to look at a range of cages really, not just ones marketed at rats. It's worth knowing that rabbit and guinea pig cages often aren't suitable as the bar spacing is too big, you're looking at 1cm bar spacing preferably if you have babies. Aviaries make great rat cages. It depends on if you want substrate or fleece (fleece can get smelly quicker, but substrate can be messier and isn't great in aviaries!) and other factors. Rats need lots of height breakers in high cages, hammocks are perfect for this and rats usually like lots of hammocks.
Paper pellets are great for substrate but it's worth trying out some other alternatives too. We've just switched from paper pellets to aubiose, which seems okay (I'm currently undecided if I like it but DH loves it!), as we have upgraded to a massive cage which was taking a 30L bag of cat litter a week. Other common alternatives include megazorb and finacard. Ratrations is a wonderful site to get rat bits from and they sell substrate in large quantities, however you can get a lot of good beddings locally if you have garden centres that sell equestrian products, a lot of equestrian beddings are suitable for rats and you can buy it by the bale, makes things much cheaper.
You need to check with vets in your area as to whether they have any small animal specialists and, preferably, a rodentologist. Not many do have rodentologists and I was very lucky with my last vet, but this vet in my new place has a staff made up almost entirely of small animal specialists, the two I've seen in the three visits last month have been brilliant! A good vet is very important with rats as a lot of cat and dog vets just don't know that much about them. In my last practice I often would walk in and end up telling them exactly what meds I needed (I have had quite a few ill rats, this really isn't common but rats are prone to respiratory issues so you do want a good vet if you need to get them treated! They are also prone to tumours, but there isn't a huge amount you can do about that unfortunately.)
Rats really are like little dogs, they're great fun and you can train them using copious amounts of ferret malt paste my girls are particularly good at being trained food motivated but what I love about them is how each of them has their own personality and I love watching how they develop.