Why water expands when freezes? [duplicate]

I'm sure this is for most of you a basic question, but it really puzzles me:

How it is that, even though all materials expand as they get warmer, and contract (maybe these are not the correct terms) when get colder, water exapands when freezes.

Thanks a lot.