It was written and produced by Dallas Austin and Pink for her second studio album Missundaztood.
The lyrics of the song about getting rid of tormenting relationships, with the implied dependence on drugs.
The song was released worldwide by the third single from the album Missundaztood in June 2002 and had commercial success, peaking at line 8 on the Billboard Hot 100 in the US.
The song was well received internationally, becoming Pink's first number one single in the UK Singles Chart and reached the top 10 in other countries: Ireland, France, the Netherlands and Sweden.
Pink said in an interview that "Just Like a Pill" shows that "part of herself she is", referring to her documentary problems with drugs.