Press 1 to enable destroying blocks; then left click on any block to destroy it. Press 2 to make the block menu come up, and type the number of the block that you want to place, then either click the tick or press ENTER. This will then let you to place your chosen block by left clicking.
V 1.2 : New Blocks! New Blocks: Coal Ore, Iron Ore, Sand, Gravel Able to place/destroy all new blocks with sounds V 1.0 : First release Blocks: Grass, Dirt, Wooden Planks, Stone, Cobblestone Able to place/destroy all blocks with sounds