It's a turn of phrase, where you are mocking someone by accompanying their expressed sadness (or whining) by "playing the world's smallest violin", e.g. by rubbing your fingers together