"Cradle cap" is a disease of the scalp in babies, characterised by greasy, yellow, scaly patches on the skin of the scalp. Please do not be alarmed by it being a disease, this condition is temporary and harmless. It is unknown as to why babies get this, you in no way have made this appear.
"Cradle cap" will go away on it's own. However, if you can't bear to have this then simply rub a little olive oil into the baby's scalp before bed. Comb the hair with a fine-toothed comb in the morning. When the scales have been removed, wash the baby's hair with a mild baby shampoo.
If the treatment does not work, or if the baby has eczema on the face or body, visit your doctor for help identifying the problem or another way of ridding your baby of their problem.