Picking Blocks with mouse

Hello I am Russian so my english not is good but i need some help.

I need a way to use the mouse to select a block, like in minecraft from a 2d grid, the blocks are 32x32.

how do i this?