The sound of the song expanded upon previous Prince arrangements, incorporating stringed instruments, Middle Eastern finger cymbals, and even a harmonica on the extended version. The song was also more in the pop vein than ever before, though the 12-inch single and video of the song feature a funky intro. Although the song was originally recorded in 1982, Prince drastically reworked it with The Revolution to give it more of an international sound. The string section comprised Novi Novog on violin, Suzie Katayama and David Coleman on cello.
The song tells of a teenage romance and first sexual experience with a girl who wears the titular hat. According to watchmojo.com, this was inspired by a deleted scene from Purple Rain, where The Kid and Apollonia made love in a barn. The video for the song was directed primarily by himself, with animation created by Colossal Pictures co-founder Drew Takahashi. The extended version was included on Ultimate in 2006. While the song hit number 1 in Cash Box and reached number 2 on the Billboard Hot 100 in the US, behind "A View to a Kill" by Duran Duran, it reached only number 25 on the UK Singles Chart.