In Utah, if you are registered Republican, you can choose to vote in the Republican or the Democrat primary election. I doubt few Republicans pick the Democrat option because it is rarely close enough to matter.
If you are a registered Democrat, you can only vote in the Democrat primary election.
If you are registered Unaffiliated, you can vote in the Democrat primary election, or if there are nonpartisan options you can choose a ballot with only those options. I vote by mail, and if there are nonpartisan options, I receive a letter telling me that I need to choose by mail or online which ballot I prefer.
All voters can vote in the general election. If you are registered Unaffiliated and voted for Mitt Romney for Senate, that had to be the general election. You wouldn't have had the option otherwise.
I don't like the closed Republican primaries, but I understand their reasoning, although since they have such a lock on the state it wouldn't matter anyway. If I didn't feel so strongly about being independent, I would change to Republican just to vote in the governor's race primary, but I just can't make myself align for even a day with either party.