It's a bit like an EEG where the visual cortex of the brain is stimulated by various objects, including checkerboards and gratings. In fact, a baby's pupils are quite small. The average size will increase throughout childhood, maintain a normal size through adulthood, then begin to decrease in size in the elderly. By the age of two months most infants are able to focus and converge their eyes at close range. Before that age, you may notice that your child's eyes move together, for the most part, but do not converge.
Most infants prefer to look at moving objects with distinct shapes.
Actually, most babies would rather look at your face. Facelike stimuli are preferentially viewed by newborns, raising the question of innate perceptual organization. There are massage techniques that should help with resolution, and antibiotic eye drops if an infection is present. If the condition persists, with chronic tearing and crusting, a probing of the lacrimal system may be performed, but usually not before 6-12 months of age. The procedure has a very high success rate for a permanent cure.