You probably want something called height maps. They're basically a greyscale bitmap where each pixel indicates the height of that part of the landscape. There are quite a lot of tutorials on the net showing how to do this in both OpenGL and Direct3D (Delphi3d and NeHe have already been posted). If you only want to create such a height map you could try Terragen. If you want to create a program where you can fly around and see every detail I recommend that you look at some of the sites already mentioned.