This could be a sign of stomach upset or another viral illness. Try to give the baby fluids, such as formula, milk, or water. If this isn't working, take the child to the doctor for an evaluation.
If the child is rejecting a single solid food, try a different one. If they don't want solid food but are drinking, try purees or jello. If the child is rejecting all food and not drinking, take them to the emergency room.
It is very important that your baby gets adequate nutriation. If he or she is not eating you should contact their doctor to have them evaluated. Babies can become dehydrated very eaisly. It is better to be too cautious than to not be. I would contact the doctor at once.
You should take your baby to the doctor or emergency room right away. Since babies get their main source of nutrients off milk if they don't eat they can dehydrate much quicker than adults. This is serious. Please take your infant as soon as possible.