Mallet clears a piece or an obstacle on the tile you hit. Rainbow Mallet removes all drops that match the color of the drop you hit. Using them doesn’t cost you a move.
To use them, you need to tap the Mallet icon and tap on the tile you want to use it on. If you accidentally tap on them and don’t want to use them, you can simply tap on an empty space outside of the board.