When you take a lozenge, it will slowly start to shrink, releasing the products inside that will soothe your sore throat.
This can suppress a cough and moisten the irritated tissues of your throat.
Many lozenges include anaesthetic properties to numb the pain, or menthol which cools the throat.