Tears evolved in vertebrates to replace the saltwater bath that fish eyes constantly experience. The human lacrimal gland produces about 1 cubic cm of tears a day under normal conditions. These tears serve to wet and clean the cornea. Tear fluids are rich in sugars and protein and act as a significant nutrition source for the cornea. Tears also have anti-bacterial properties making them effective at fighting infections.
Tears are salty to create an osmotic balance with the fluid inside the eye.
The lacrimal system is a complicated series of ducts surrounding the eye. Tears secreted from above the upper eyelid mix first with mucus before covering the cornea. Interestingly, psychological or emotional crying is unique to humans and certain species of bears. It appears to serve no physiological purpose and is one of the mysteries of biology. Most aquatic or mostly-aquatic animals have no eyelids at all.