This idiom is used when someone doesn’t want to make any concrete plans, but to wait and see how things turn out before deciding what to do. It means to act spontaneously and according to the situation, because you have no game plan.
The original meaning of this term was to play music without sheet music, meaning you either remembered the music or improvised it. This sense of the idiom dates back to the 16th century, but the present use only came into being in mid-20th century America, primarily referring to sports.
From there, it came to mean other types of making it up as you go along. If a quarterback plays it by ear, he abandons the called play and tries something different. If a politician plays it by ear during a speech, she is making it up on the spot. We all have to play it by ear sometimes.
The phrase ‘play by ear’ is much later. The first record of it is in an 1839 edition of The Edinburgh Review:
“Miss Austen is like one who plays by ear, while Miss Martineau understands the science.”
And another “ear” idiom we’ve all heard —music to your ears — means news or information that you are very pleased to hear.
And perhaps most actual music is ‘music to your ears.’ But not all of it! As a personal example, while some people adore opera, I find that a soprano voice hurt my ears.
And then there’s the ‘earworm’ — A catchy tune that frequently gets stuck in your head. Which gets really boring if you keep singing it to yourself.