SPF = Sun Protection Factor.
Sunscreens are labelled with an SPF to show the level of protection against UVB, but not UVA. It could be more accurately thought of as the "sun burn protection factor", as excess UVB is responsible for causing sunburn.
The higher the SPF rating, the more protection in theory is offered, and the longer it takes for the skin to burn in the sun. However, this all depends on many factors like your skin type, the country you're in, the sun's intensity, swimming, sweat and how the sunscreen is applied.
There are several important aspects to choosing a sunscreen product:
SPF rating for the protection against UVB; the higher the number, the better the protection; UVA rating for the level of protection against UVA. Look for a product that has the UVA logo on it or the star ratings (five stars being the best);
Make sure the product is not past its expiry date.
Look for a sunscreen that has protection against both UVA and UVB (known as "broad spectrum").
Sunscreen products cannot (and don't claim) to protect against cancer. They can, as part of a sun safe regime, help prevent the DNA damage that causes sunburn and other damaging effects of ultraviolet exposure from the sun and sunbeds, such as premature ageing.
The level of protection actually offered depends on many factors, including skin type, the sun's intensity (location, time of day/year), how the sunscreen has been applied and how often topped up, and how old the sunscreen is.
Some cosmetic products come with a Sun Protection Factor. The SPF in moisturisers is tested in the same way that a sunscreen product is tested, so a SPF15 moisturiser should provide a SPF of 15.
However, moisturisers are not generally water resistant and are usually applied thinly; therefore, they are unlikely to offfer the same level of protection as a sunscreen product of SPF15. As make-up is generally only applied to the face, it does not offer complete protection.
Also, SPF refers to the level of UVB protection, so a moisturiser or make-up item with an SPF does not protect against UVA.
The better way to protect your skin against both UVA and UVB is to use the right sunscreen product.