What should I feed my rat?

Rats are omnivores and will eat just about anything, but this is a better diet then feeding junk food. Lab Blocks=Purina Rat Chow/Small Animal Pellets are complete rat nutrition. These are about 3/4 inch long hard extruded greenish feed pellets. ~ 55c/lb. So are Harlen lab blocks (high quality!), which come in F4 (regular) and F6 (nursing and pregnant rodents) Big males should get dog-bones=MilkBones=AttaBoy because they are lower in fat, and old males tend to obesity. ~55c/lb. There are a number of other brands of lab blocks out there, some better then others.
Any brand of lab blocks will do in a pinch if you cannot find the above brands. Some people have been known to use dry dog food when lab blocks cannot be found, but dog food tends to be too high in protein and fat and may cause skin problems.
Small amounts of vegetables, fruit (fresh or dried), meal worms, crickets, high quality hamster diet, dried corn on the cob or low fat whole wheat bread are good as treats. Do not feed chocolate, potato chips and other obviously unhealthy junk foods as they tend to be high in fat and can lead to obesity, tumors and heart trouble. Avoid feeding too many nuts or other high protein items, not more then about %5 of the diet if possible due to the high fat content. Vitakraft (from Germany, but available in many USA pet shops) makes a number of small animal treats that most rodents love.
Nutri-Cal (vitamins) can be used once in a week for healthy or daily with sick, pregnant or nursing animals.
Plenty of fresh water should be available to the rat at any time. Oasis water bottles are best, due to the wide cap that makes the bottle last longer then the cheaper brands. Oasis also makes rather clever water bottle holders that have guards on the top and bottom, all but eliminating chewing. Old style glass tube water bottles tend to leak more then the ball bearing style metal tube style. Water bowls are not advised as they quickly become contaminated with bedding, food and waste.