NOSE RING HELP

quick question I just changed my ring to a hoop nose ring. How long can I keep a hoop in for? I heard that it can get infected or something if I keep it in for a long time