If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
There is a grid of bricks of different colours. When you click on a grid, all the bricks that are connected to this brick by the same colour will be destroyed. The bricks on top of the destroyed bricks will collapse and the columns of bricks will merge. If you want to remove a single brick, you must use a magic wand. The game ends when you run out of magic wands and you can no longer destroy bricks by groups.