Here's one possible way to do this:
For the sake of the example, assume that your background terrain texture is a full screen 720p texture (1280 x 720) and has only 2 colors: Blue for sky and brown for ground, in a side view. You want your sprite to "walk" on the ground. So what you do is get the color data of the texture into an array of Color:
Declare and initialize an array member in your class:
Color MyTextureColor = new Color[1280 * 720];
Then after loading the texture, copy its data into the array:
You can now check the color of every single pixel by looking into this array: Color at pos x,y is = MyTextureColor[x + y * 1280]. So you can program a constraint in such a way, that your sprite is only allowed to move to a position where the color at pos x,y is blue (=sky). If the color is brown (=ground) the sprite is not allowed to move there.
To "destroy" some terrain, modify the values in the MyTextureColor array, i.e. set the brown color at those pixel positions which are being blown up to become blue color instead. After changing all the pixels that are affected by the explosion, write this change back into the texture:
Of course this is very much oversimplified, but it should give you something to start off from...