SPF stands for sun protection factor, a measure of how well sunscreen protects against UVB rays. (UVA protection isn't rated.) Manufacturers calculate SPF based on how long it takes to sunburn skin that's been treated with the sunscreen as compared to skin with no sunscreen.
When applied correctly, a sunscreen with an SPF of 30 will provide slightly more protection from UVB rays than does a sunscreen with an SPF of 15. But the SPF 30 product isn't twice as protective as the SPF 15 product. Sunscreens with SPFs greater than 50 provide only a small increase in UV protection.
Also, sunscreen is often not applied thoroughly or thickly enough, and it can be washed off during swimming or sweating. As a result, even the best sunscreen might be less effective than the SPF number suggests.