I had a hip done here locally so I'm talking form experience. I had those classes too. They tell you about infection because infection is serious and they have to make you believe it. Truth is, it doesn't happen very often and if you guard against it it won't happen to you either.
It's just one more life adventure, and after it's done you will feel much better and walk much better. Pain? Of course. But that too ends if you work hard in the rehab process. You can't throw a rock in The Villages without hitting someone who has a replacement hip or knee, so welcome to the club.
Take a deep breath. Keep a positive attitude, even when it's tough to do. Do what they tell you to do. Take your meds. Work hard in rehab. You'll be fine!