There are three types of the primary elections: “open primary,” “closed primary,” and “blanket/ nonpartisan primary.”
First, an “open primary” is a primary where you - as a voter - don’t have to be affiliated with the party for whose candidate you’re voting. In other words, if you registered with one party you can still vote for a candidate from another party in an “open primary.”
Second, in a “closed primary,” you can only vote for a candidate from the party with which you’re affiliated. In other words, if you’re registered as with a particular party, you can only vote for a candidate from that party.
Third, in a “blanket” or “nonpartisan primary”, also called the “jungle primary”, you can vote for candidates from different parties as you receive a single multiparty ballot and are not bound to party affiliation.