There is no consensus on the cause of cradle cap, but we do know that it is not caused by poor hygiene or allergies. It's not contagious and most likely doesn't bother the baby, but if it gets severe enough it might itch. It doesn't really need any treatment but if the condition bothers you, try shampooing more frequently with a mild shampoo and gently rubbing baby's scalp with a terry-cloth towel or a very soft brush.
For those really stubborn cases, some find an oil remedy helpful. Rub a tiny amount of baby oil on your baby's scalp. Leave it on for about 15 minutes. Gently remove the flakes with a fine-toothed comb or a soft brush. Follow up by washing the baby's scalp with a gentle baby shampoo. Leaving the oil on the baby's scalp clogs the pores and causes the flakes to stick. In severe cases, a paediatrician may recommend a dandruff shampoo. The good news is that when your baby's cradle cap is completely gone, it's not likely to return.