Use "a shame" to show that you feel like something has been lost or wasted. For example, if someone spilled ink on a pair of pants that she has just bought, you can say:
What a shame!
The meaning of this is very similar to "a waste", but a little stronger. You'd use "a waste" but not "a shame" if you order more food than you're able to finish eating at a restaurant:
The phrase "It's a shame (something happened)" explains what situation you're talking about:
It's a shame we can't take them home with us.
It's a shame I won't get to see you. I wish I could change my travel plans.
To make this phrase stronger, use "a damn shame" or "a crying shame":
It would be a crying shame for all these computers just to go to waste.
It's a damn shame they had to close the restaurant down when it had just started to do well.
Saying that something is "a shame" is much more common in spoken English than in writing. In writing, you can say that something is "too bad" or "a waste":
It's too bad you weren't able to make it.