Depends on several things, not the least of which is your carrier.
In theory, the address takes precedence over the name. So if it a wrong address, but that address exists, it should get delivered to that address. But a carrier may intervene. For example, my company moved several years ago from one office to another office right next door. Occasionally we still get mail with the old address. The old address is still there, and occupied by someone else, but the carrier knows us, so he just ignores the address and brings it to us.
If the address is non-existent, I don’t think the Post Office is obligated to try and find you (although I can’t remember what the actual rules are, it’s been too long since my dad was a carrier and we talked about this) but most carriers I’ve known will make at least some attempt, and some will do everything they can to find the proper recipient.
My dad delivered the occasional letter where the address was something like “Uncle Dave”, no address, but the correct city and zip. He just kept asking everyone on his route until he found someone who recognized it.
If the name, city, state and the 5 digit zip are correct, that will get it at least to correct post office, and in some cases to the correct carrier. If there is a correct 9 digit zip, that will narrow it down to a either a single address, or at most to a few very close addresses, and so definitely to the right carrier.
And if it does get to the right carrier with enough name and address to give them a good clue as to who the addressee is, there is a fighting chance it will get to you. If it doesn’t, asking at your local branch may find it.
In fact, if you know that such a package is on the way, tell your carrier about it. Most will be glad to watch out for it, and get to you forthwith.