Duke Ellington said that it "don't mean a thing if it ain't got that swing." Louis Armstrong said that "if you've gotta ask, you'll never know."
Some music swings, and some doesn't. The music we play at the Newcastle Swing Dance Society is not all strictly what a music historian would call "swing", but it swings. The answer lies partly in the history of swing music. If you were a trombonist working in the 1930s, you would need to make money. You would get nothing from sheet music sales. You earned your money playing music for people to dance to. Every village had a dance venue and held dances every week. That's where people met and fell in love. As a wise trombonist, therefore, you made sure that people liked dancing to what you played. Swing music was designed to be fun to dance to. This was its prime function, above being merely listened to.
Almost all music in the modern charts has no swing to it at all. The tempo of the music is kept by the drummer, and every beat is as important as every other beat. The main notes of the tune and the main words of the lyrics tend to be played or sung on the beat, and the beat is relentless. This is sterile for a good swing dancer. There is nothing there for a swing dancer to work with. Good music for swinging to has "hits" and "breaks". A hit is an excuse for a wild kick or the like, it is a note or group of notes that stands out from the rest by being louder, or higher, or sharper than the others. A break is a moment in the music when there is a sudden lull, perhaps even absolute silence. This is an excuse to do the opposite of dancing to a hit - to slow things down, makes smaller moves, and perhaps even come to a complete halt. Other styles of music may also have these hits and breaks, but importantly, in swing, these features are predictable - a dancer can hear them coming, even in an unfamiliar piece - because they are signalled by the musicians. This means that the dancer can make himself ready for them and honour them when they come, rather than be surprised by them.
In jazz music, the tempo is not kept by the drummer, but by the bass player. The drummer is therefore free to do what he wants, perhaps coming in late or early, perhaps using a stop-start style. Some musical experts try to define swing music by one of its common traits, which is a quaver-crotchet-quaver pattern, or short-long-short, typified by the distinctive sound on the high hat:
tat-tiss-tat, tat-tiss-tat, tat-tiss-tat, tat-tiss-tat…
Which you might count:
And-one-two, and-three-four, and-five-six, and-seven-eight…
But not all swing by any means goes this way. Another trait of swing music is "kick brass", where a small group of brass instruments plays sharp blasts of a few notes to boost the number, without actually being tuneful on its own. The main melody might be played by a solo instrument, like clarinet, or trombone, or trumpet, and these instruments might also do improvised solos.
The bass player typically plays on the beat, keeping the band together, but he does not hammer away at one string, like rock and rock and roll musicians do. Instead he walks up and down the scale.
The biggie about what makes swing music swing, is that the musicians play each note with its own degree of emphasis, and its own careful timing. Many notes are played longer, shorter, quieter, louder, earlier, or later than the dots on the page would suggest. Every note therefore has its individual degree of importance, and there is something for the dancer to work with - to interpret.
Another thing one notices about swing, is that it has a friendly sociable feel to it. It is difficult to feel low or lonely while listening to swing. It is not a harsh, resentful or aggressive music, as much modern stuff is, but instead is the perfect music to get people of all types to come together and dance.
A lot of music that is really boogie-woogie gets confused with swing. Jools Holland plays a lot of boogie-woogie, and not much swing. The instruments used, the subject matter of the lyrics, and many of the musical tricks seem to be the same, but boogie-woogie is different. It is possible to Lindy hop to boogie-woogie numbers, but they are not the ideal music. One way of describing the difference is to call Lindy hop swing "horizontal", and boogie-woogie (and rock and roll) "vertical". Boogie-woogie has a thumpy-thumpy bouncy up and down feel to it, which encourages the dancer to bounce around and stay upright, whereas Lindy has a smoother cruise to it, and encourages the dancer to get down, lean off his partner, and slide and shuffle.