In Chapter 13, Holden decides to walk back to the hotel from Ernie's, he has his time, so far, trying to connect with strangers, and not acknowledging that he is lonely for a familiar voice, his family, etc. Or that he has made a mistake by leaving school without permission and without telling his parents, he is lonely, depressed and feeling isolated.
"I walked all the way back to the hotel. For-one gorgeous blocks. I didn't do it because I felt like walking or anything. It was more because I didn't feel like gettin in and out of another taxicab. Sometimes you get tired of riding in taxicabs the same way that you get tired riding in elevators." (Salinger)
What Holden is saying in this chapter is that he feels very closed in by his circumstances. He has had nothing but trouble since in arrived in New York City, he has been feeling loneliness and isolation. Instead of going home, like he should, Holden has attempted to connect with total strangers who have no interest in mothering him.
In Chapter 13, Holden wants to be alone, even though he really feels alone, he wants to be physically separate from people because so far, all they have done is let him down.
As he walks he searches his memories, recalling the time his gloves were stolen at Pencey, pretending to confront the thief. Holden decides that he is a coward.
However, his actions suggest otherwise, before he goes to the hotel, he tries to go into a seedy bar and runs into two drunks, so he goes back to the hotel and in his depressed, indifference ends up getting into more trouble when he gets into the elevator.