To remove lava or water you need to remove the source block (the block that is creating the water/lava and not the ones flowing from it).
For instance, if you see a waterfall coming out of a wall in a cave, or on the side of a mountain, you need to delete the (source) block coming out of the wall.
If you're taking about a pool, if you just need to keep deleting blocks until you delete all the source blocks. In a pool, if you delete a block, and the water/lava is still there, note where the water/lave flows from- that's probably (one of) a source block(s). Finally, when it comes to pools, I usually find it a whole lot easier to just fill it in with something. Sand or gravel works well cause it falls to the bottom after you place it... or you can use another block and just make a path over it.