If you have other symptoms like nasal congestion, sneezing and cough, it's likely a cold.
White spots on the tonsils could indicate a bacterial infection.
A sore throat that persists for more than 2 weeks is strep throat.
Sore throat should be treated with antibiotics
There is nothing to be done for a sore throat caused by a viral infection.