This happened to my mom last October. She had hip and knee surgery to resolve issue with pain. Everything went fine, but several days later, she got infection in her knee and had to hospitalized again. It is actually common when people get infection after surgery or after injection. My mom is allergic on most common antibiotics and it was very difficult to treat her. She got even more sick and spent most of October to be lying, which postponed her rehabilitation.
I had an experience like this 16 years ago , I had major surgery after a course of chemo . Of course my immune system was compromised by the chemo and my quite large wound became infected . A hospital stay and antibiotics sorted the problem .
During my stay in hospital the wound had to be scraped out each day to get rid of the necrotic ( dead ) tissue . Most of the nurses hated doing this but one particular nurse , an avid pimple squeezer I assumed ! loved it and volunteered each day as it really cheered her up ??It felt nice to make someone's day .