This can occur after a bite wound or a similar laceration. It will be red and swollen. It will be painful for your little one, so handle with care. They can break and drain pus.
Frequently clean it with a warm compress, and keep an eye on it. As soon as it ruptures, clean it with a syringe and saline water. Keep it clean as possible, and it should heal.
If it reoccurs, affects your rat (poor appetite, lethargy etc) or becomes infected, seek advice and treatment from your vet immediately.