Well, it's true. Anyone can get a kidney infection, but there may be things about you and your life that make it more likely. These are called risk factors. The risk factors for kidney infections are the same as the risk factors for bladder infections.
Having sex makes it slightly more likely that bacteria can get into your body from the area around your genitals. It is very rare though.