Azalea's sophomore studio album was originally entitled Digital Distortion and set to be released in 2016, with its lead-single "Team", being released in March 2016. However, the album was postponed several times in 2016, with Azalea initially addressing the delay due to her stint as a judge on the eighth season of The X Factor Australia, and later adding that she also delayed the album to include a collaboration with Russian-German DJ Zedd. Eventually, the album was postponed to 2017, since Azalea claimed she experienced both personal and creative changes. In March 2017, she released a second single titled "Mo Bounce". Quickly afterwards, Azalea teased a snippet of a song in an Instagram video with the caption: "IGGY X ANITTA" in early April, indicating that she was collaborating with Brazilian recording artist Anitta. Later in the same month, they were seen together in the studio to finish the track. Eventually, Azalea revealed that the track was called "Switch" by posting its cover art on 2 May 2017. In the cover art, she is "staring into the camera while wearing a one-piece maroon bathing suit," as described by Billboard Gil Kaufman. It was released digitally on 19 May 2017 by Def Jam Recordings, and was sent to both contemporary hit radio and rhythmic contemporary radio on 23 May 2017.
Recording
"Switch" was recorded by Azalea in August 2016. However, she needed a female singer to sing its chorus and spent months trying to find a fitting voice, claiming she wanted to think outside the box. In a radio interview with Zach Sang, Azalea discussed the track, adding: "I couldn’t think of who should sing on this song with me because I just really wanted to bring another female energy. I didn’t really have any female collaborations yet on my album and I think people really enjoy me collaborating with other women and I wanted to make sure that I still did that." She continued talking, saying that a friend of hers suggested Anitta to sing the chorus. While watching Anitta videos on YouTube, she was impressed by her stage presence and dancing skills in music videos as "Show das Poderosas" and "Bang", and commented: " I hit her up and asked if she would be interested in doing the song and it just kind of worked out perfectly." Anitta's part on the track was only recorded in February 2017, where Azalea helped her with the song's cadence and spelling of some words. In another interview, she described Anitta as a "very unapologetic and strong but super feminine. We clicked straight away."
Composition and lyrics
"Switch" was written by Azalea, Anton Hård af Segerstad, Akil King, Christopher Martin, Georgia Ku, Kyle Owens and Maurice "Verse" Simmonds. It was produced by The Family and Eric Weaver. "Switch" is a pop song, having a "tropical vibe and Latin flavor" as described by Azalea herself. Its instrumentation consists in bass, plucky strings, bongos, and hand claps. As claimed by Azalea, "I wanted to make a song that could be fun to dance to, but the lyrics when you really listen to them are very powerful." Lyrically, the song talks about "looking good and being fierce" and was also described by Azalea as about "a woman being in control of what I want to do and when I want to go and when I want to stop." Lindsey India of XLL added that its lyrics find Azalea "boosting her confidence no matter what the haters might have to say." During the chorus, the sexual lyrics "likens her moves to a traffic light that shifts from red to yellow to green," as they sing: "Red light, yellow light, green light, Switch!/This is about the time you recognize I’m that bitch." In its bridge, as noted by Entertainment Weekly Joey Nolfi, "Azalea seemingly references her separation from former fiancé Nick Young, rapping, 'He don’t love you, that ring ain’t big enough.'" She also raps about "boasting about going topless, along with having a top-tier booty that 'deserves an applause.'"
Critical reception
Mike Wass of Idolator called it a "feel-good anthem," adding that "Switch" "has a massive chorus, bone-rattling beats and endlessly quotable lyrics. It’s proof that the 26-year-old has finally discovered a sound that plays to her strengths." Joey Nolfi of Entertainment Weekly agreed, classifying it as "a summer-ready club banger" with an "easily danceable chorus." Lindsey India of XXL wrote that the song "could easily become a pop party anthem this summer," while Melody Chiu of People named it "powerful". Joshua Espinoza of Complex opined that the song "uses the same formula as Iggy’s breakout song 'Fancy,' noting that it has "infectious beat," a "catchy hook" and "cocky lyrics."
Music video
A few days after the song's release, an unfinished version of its music video was leaked. After this, Azalea stated that an official version of the music video would not be released. In the music video, Azalea and her team of dancers remake an empty pool and use it as their matching red, yellow and green backdrop. Anitta also makes an appearance, pretending to watch ice sculptures of alligators before lounging in a pool with Azalea. The pair later wear matching cheetah print outfits while surrounded by the large cats.