The number of white spots might be helpful. Also, the presence of other symptoms such as fever, more crying, swollen glands, cough, and tiredness is important.
In measles (highly contagious disease), white spots appear on the inner side of the cheeks and tongue in the first days of the illness. These spots are called Koplik spots and are a prodromal sign for measles. They usually appear on the inside of the cheek opposite to the lower molars.
If the spots are more numerous, grow within days, and even connect with each other, the spots might be caused by a fungal infection (thrush). Thrush is a fungal infection most commonly caused by the fungi from the Candida species. Antifungal medications (both for local and systemic use) might easily treat oral thrush. However, visiting a pediatrician is highly recommended in order to clearly determine the exact diagnosis that would further determine the adequate treatment.