The song was written by both alongside Savan Kotecha, Ilya and Max Martin, being produced by the latter two with Shellback, with Peter Carlsson serving as a vocal producer.
"Problem" is an uptempo dance-pop song with influences of R&B music, which comprises a melody based on drums, saxophone loops, and trumpets.
The chorus features uncredited background vocals from American hip hop artist Big Sean.
The song debuted at number three on the Billboard Hot 100 selling 438,000 copies in its first week on sale, earning Grande her biggest digital song sales week ever.
The song later peaked at number two, surpassing "The Way" as her highest-charting single in the United States.