This has been discussed several times. I'll do a quick recap of heightmaps and terrain algorithms.
Terrain algorithms: dead. Just brute force. Caveat: perhaps using pixel-based tracing might make sense.
Heightmaps: they are 2D array of values.
Format to use: everything lossless will fit. I like PNG 16-bit grayscale. A raw dump might be more appropriate in some cases. Multichannel recomposition (value = red + (green << 8) + (blue << 16)) is hard to work with but at least it won't get garbled if some processing program does not support it. Floating-point based formats are to be taken with extra super special care.
How to convert them: they are a bunch of triangles! In the past, several methods have been proposed. In the end, they're not really required unless going for AAA quality, and even in this case, you'll find out many games triangolate trivially.
OpenGL implementation: there are plenty.
You're better with a specific question.