SPF stands for "Sun Protection Factor." This measures how much protection the product will offer in relation to the burn time of the user's skin. For example, if the skin burns in 10 minutes, a product with an SPF of 15 would prolong the time it takes for the skin to burn--in this case, 150 minutes.
UV stands for "ultraviolet," a type of radiation emitted by the sun that makes it possible for exposed skin to burn on cloudy days as well as sunny ones. The levels of UV radiation are constantly changing.
Sunscreen protects skin by reflecting, scattering or absorbing some of the UV radiation, so that it takes longer to burn the skin.
Melanin, the substance which gives the skin color, is designed to absorb and dissipate energy from the sun, thus further protecting the body. This is why fair-skinned people sunburn more easily than people of darker complexion. Suntans and freckles are both the result of the skin attempting to protect itself.
Sunscreen is recommended by doctors because it lessens the chance that overexposure to UV will result in cancerous melanoma.
The effect, then, of sunscreen on a cellular level is a protective one: the cells avoid damage through the chemicals in the sunscreen that absorb, reflect and scatter UV radiation.