The song was written and produced by Stephen Bray and Madonna. Bray originally met Madonna during her pre-stardom when she attended the University of Michigan in Ann Arbor to study dance. The pair went to New York together and became part of the band The Breakfast Club. Madonna soon left but Bray continued as their drummer and in 1987 they had a hit with "Right On Track". When Madonna obtained her recording contract with Sire Records, she continued collaborating with Bray and they wrote some of the Material Girl's biggest hits of the 1980s including "Into the Groove" and "True Blue".
The song begins with the sound of brass tinkling along, as Madonna chimes the opening line. Handclaps and drum beats start as Madonna moves into the chorus of the song, with a thick vocal texture and high-pitched background singing. The chorus is aided by instrumentation from a saxophone and percussion.