It can be either literal or figurative, and is often something of an over-exaggeration.
The idea is that if you repeatedly shoot at something, it gets so full of holes, that it eventually falls to pieces. Obviously, that's easier to actually do with something like a machine gun!
So - someone or something can be literally shot to pieces - often in wartime.
In the figurative sense, it is usually used to refer to arguments or ideas. When someone offers a counter-argument, or counter-example, they can be said to 'shoot a hole' in what they are attacking. If there are enough holes in the argument or idea, it has been 'shot to pieces'. The opponent has found so many holes in it, that it is clearly not very sound or reliable .
Does that make sense?