Female rats can become sexually mature at around 6 weeks old. Their vaginas are sealed shut until their first heat cycle. This means that they cannot become pregnant until their vagina is opened. This can happen anywhere between 5-7 weeks old. They will then come into heat every 4-5 days. They can only become pregnant if they mate while she is in heat. There will not be any physical signs of pregnancy for the first 2 weeks of the pregnancy. During the last week, she will gain a noticeable baby belly and may start losing some hair around her nipples or may start nesting.
If you have a known, unplanned mating you can bring her to the vet and have her pregnancy terminated. This will be the best option for her, especially if she is from an unknown source or from a breeder who has sold her on a no-breeding contract.