2d voxel terrain

How can i get a smooth way to get 2d voxel terrain(think minecraft 2d or terraria)?
thanks