The rules are easy, move the tiles up, down, left or right and merge tiles of the same number, if they touch to create a higher number. It is no magic it is mathematics as 2+2 is 4 and 32+32 is to create a single 64 tiles.