Something that's off-key is out of tune or unmusical. If your jazz band is off-key from the first note of their first song, it'll make the audience cringe.
You might not care if your friends are off-key when they sing "Happy Birthday" and present you with a chocolate cake, but you may want to get your money back if you buy expensive tickets to hear an orchestra play off-key renditions of Bach and Beethoven. This musical meaning inspired the figurative off-key, meaning "not fitting" or "clashing": "The mayor's big-city values are off-key in our little village."