Referrals in my company basically just guarantee that the resume isn't immediately thrown in the trash, doesn't really help anyone's odds otherwise. I suspect in most companies it's similar, if they even get that much of a benefit (unless you're upper management (aka nepotism) I guess)
Nepotism is most associated with relatives although I guess it doesn't have to be. But I've definitely gotten several jobs through senior managers I had worked with which largely bypassed the whole HR system where it existed.