Ackley is a Holden's neighbor who lives next door. He has problems with teeth, and the protagonist always mentions this. Ackley enters the Caulfield's room whenever he wants to and by doing this he disturbs the protagonist. The neighbor doesn't understand hints that Holden gives him about leaving the room.
Ackley is included in the text to show that some people can be disturbing, but they can still give us a company. Also, this character even enforces the positive Holden's traits. Although he hates the guy, Caulfield wants to communicate with Ackley because both of them are quite lonely.