When you register to vote, you may choose to affiliate with a party at that time, or you may choose to remain unaffiliated. New Jersey has a hybrid/closed primary system, which means that party primaries are limited to voters affiliated with the major parties (Democratic or Republican).
Unaffiliated voters may vote in the general election but not in a primary unless they declare their affiliation, which they can do at their polling location up to and at the time of the primary election (which is what makes the primary system "hybrid").
To declare or change a party affiliation, or to declare yourself unaffiliated, you can use the online voter registration form or the paper Political Party Affiliation Declaration Form, sent to the Commissioner of Registration for the county in which you’re registered.
Where to send the print form: