Ice is reflective and when the sun hits the polar ice it's heat gets bounced back and doesn't significantly effect the water or earth. When the ice is melted there is less ice to reflect the sun away, and the water gets warmed, therefore warming the oceans.
Hope this helped! Let me know if I need to clarify anything or explain anything more in depth!