Shell rot is a bacterial or fungal infection. It is usually caused by damage to the shell, even a minor scratch. If the environment is too damp, too dry, if heating or light is incorrect, if your turtle's diet is wrong, these conditions can cause infection. There are some home treatments, but I would recommend taking your turtle to a reptile vet to be examined.