TARDISes have a chameleon circuit, which changes their shape to blend in with their surroundings wherever they land. ("The Time Meddler", "Logopolis") When the Doctor landed in 1960s London, a police box was a very good disguise.
However, the Doctor's TARDIS's chameleon circuit broke, so it's stuck in that shape. ("An Unearthly Child") He believed it broke down because his TARDIS had been in for repair when he stole it ("Logopolis"), although according to the comics, the Eleventh Doctor went back in time to 1963 and did it on purpose. ("Hunters of the Burning Stone" (Doctor Who Magazine comic story))
The Doctor is usually happy with the shape ("Boom Town", "No Future" (Virgin New Adventures novel)), but a few times he's complained about it, or even tried to fix it—with temporary and limited success. ("Attack of the Cybermen")
While most other TARDISes we see have working chameleon circuits ("The Daleks' Master Plan", "The Deadly Assassin"), faults do seem to be reasonably common , as with Ashildr and Clara's TARDIS stuck in the shape of a diner ("Hell Bent"), or Homoculette's humanoid TARDIS stuck in the shape of a 1960s policewoman. ("Alien Bodies" (BBC Eighth Doctor Adventures novel))
Out of Universe Edit
According to early producer Peter Bryant, the show originally planned to have the TARDIS disguise itself in each story, but they quickly realized that would be too costly. If you want to set a story in Regency London, the BBC already has all the props, costumes, and sets you need, for free—but if you want the piano to have a door in it that the characters can comfortably step through, you have to design and build it.