Stability

A sorting algorithm, or just an algorithm in general, is said to be stable if it is guaranteed to maintain the order of equal elements. Similarly, an algorithm is unstable if this restriction is not guaranteed to hold.

Example
Suppose you are sorting a deck of cards by number, counting aces as ones, jacks, queens, and kings as 11, 12, and 13, and other cards as their face value. One way you could do this is by using selection sort, where you put the card with the least value at the start of the deck and then repeat for the remaining cards. This would be a perfectly valid method of sorting the cards by number.

However, there is something we're forgetting. What about the suits of the cards? Every card simultaneously holds a number and a suit, but when we sort the cards we don't pay any attention to the latter. By using an unstable algorithm like selection sort, the suits of cards with the same number might get jumbled up. A stable algorithm, like insertion sort, would make sure that the suits of the equal cards are not mixed up -- if you have a 3 of diamonds followed by a 3 of clubs, a stable algorithm would ensure the 3 of diamonds stays before the 3 of clubs.

When it matters
Consider this: you want to sort the cards by suit, and then sort any cards with the same suit by number. First, you can sort the cards by number using either a stable or unstable sorting algorithm. Then, you can use a stable algorithm to sort the cards by suit. The attribute with highest priority (in this case suit) should go last. This is one of the useful properties of stable sorts -- they can be used to sort elements using more than one metric.

If you're not sorting elements by more than one metric, however, using a stable sort instead of an unstable sort can be more or less helpful in different situations. For example, if you're just sorting integers, it wouldn't matter if you used a stable or unstable sorting algorithm. This is because if two integers compare equal, they are identical in the sense that they carry the exact same information. Remember, that wasn't the case with our deck of cards -- just because two cards have the same number doesn't mean they have the same suit as well. (Of course, if you're sorting integers AND don't care about space complexity, you may as well go with a bucket sort.) However, if elements carry more information than what is compared, then a stable sort may be the way to go. Of course, if the order of the other information isn't relevant, you can just use an unstable sort anyways.