The term you are looking for is multitexturing. For this, you have to send every texture you want to use to the pixel shader, and there decide from some per-vertex weight factor how much each texture will add its value to the final color. For example, if you want to use 4 textures, you add a float4 value to your vertices (I'd call this weight). Then in pixel shader sample your 4 textures into
float4 col1,col2,col3,col4 values. The final color then would be:
float4 finalColor = col1*weight.x + col2*weight.y + col3*weight.z + col4*weight.w;
You should set the weighting while generating your heightmap, and the weights should normally add up to 1. The logic, which you generate those should be trivial for you, but if you are having problems, then I recommend Riemers' tutorials which is XNA, but it can be easily implemented. You can even look at his multitexturing algorythm based on terrain heights.