Sunscreen is one of the better-evidenced preventive measures available and the way it is used undermines it more than the product choice does.
What SPF measures
Protection against UVB, the wavelengths that cause burning. The number indicates how much longer it takes to burn compared with unprotected skin, under laboratory conditions using a specific thick application.
The relationship is not linear in the way it appears. SPF 30 blocks roughly 97 percent of UVB and SPF 50 roughly 98. The difference between them is smaller than the numbers suggest.
What SPF does not measure
UVA, which penetrates deeper, contributes to ageing and skin cancer, and passes through glass. Look for broad spectrum labelling or the equivalent regional marking, which indicates UVA protection as well.
The application problem
The laboratory measurement uses about two milligrams per square centimetre, which for a body is roughly a shot glass worth. Most people apply a quarter to a half of that.
Applying half as much does not give half the protection; it gives considerably less. That is why real-world protection falls far short of the label.
Reapplication
Every two hours in sun, and after swimming or heavy sweating regardless of water-resistance claims. Water resistant means it holds for a stated period in water, not that it is permanent.
The parts people miss
Ears, back of the neck, tops of the feet, and the scalp along a parting. These are common sites for skin cancer precisely because they are missed.
The caveat
General information. Anyone with a history of skin cancer or unusual moles should be under medical guidance.