To "apply" sunscreen means to put it on someone (yourself or someone else).
The word "apply" sounds technical, so you would use it in situations like when you're giving someone instructions. The sunscreen bottle will probably use the word "apply" in the instructions, for example.
In more casual speech, you can use "put on" instead of "apply":
Don't forget to put on sunscreen!
You can also "apply" things other than makeup:
- Apply makeup.
- Apply a cream or ointment to a cut on your skin.
- Apply glue to something that you're trying to stick together.
- Apply a wood-sealing liquid to the wood on your porch.