Why is ice used in beverages?
Have you never had a coke with crushed ice and lemon peel on a hot day?*
I was going to ask if you have ever had a cocktail. But given that you might be a Year 10 student, I'll refrain.
Anyway, the ice cools the drink. As soft drinks, and alcoholic beverages, are water-based, the ice dilutes and chills the drink (and the cocktail) as it thaws.
(*And if the Coca Cola corporation want to pay me for that endorsement I am open to a modest emolument!)