Bacterial arthritis happens when a bacterial infection moves to a joint. It's most common in infants and older adults. The infection most often affects knees. But it also can affect hips, shoulders and other joints. Quick treatment is needed to keep joints from being damaged.