Ice is less dense than liquid water because when water freezes, it like to arrange itself in such a way that leaves gaps in between then each water molecule. The way they're arranged in ice, they're less packed together than they are in liquid form. That makes ice float rather than sink.
Hope that helps!