modified primary
Kansas has closed primaries. Voters registered as Republicans can vote only in the Republican primary; Democrats can vote only in the Democratic primary. Registered Independents can change their affiliation and vote in that primary.
Anyone who is registered to vote in West Virginia can vote in the primary election. It does not matter whether a person is Independent, Republican, or Democrat at the time of voting.
It depends on what state (and what office)? Laws vary state by state usually determined by what the parties decide. On the presidential level, independents can currently vote in 33 states in the (Democratic) Primary (there's a few states, e.g. California, where it's open in one party and closed in the other) and closed in 17. In Idaho, the Republican Party is trying to close down a primary that has been open for many years and independents (led by the Committee for A Unified Independent Party (www.independentvoting.org) and the Amnerican Independent Movement of Idaho intervened on the suit and won the right for the first time for independents who are not a party to be party to a suit of this kind). And there are several states (e.g. Kentucky) where legislation has recently been introduced to open the primaries).
Open primary
Independents
Independents can vote in general elections. True independents, who are not members of any political party, are not eligible to vote in primary elections to determine the party candidate, though in practice there's essentially nothing to keep them from registering as a member of a party and voting in the primaries if they want to, even if they don't generally support the party. However, there are 17 states in which a registered independent voter can participate in the primary election of a specific party, and even though they are not registered under those parties. Those states are Alabama, Arkansas, Georgia, Idaho, Indiana, Michigan, Minnesota, Mississippi, Missouri, North Dakota, South Carolina, Tennessee, Texas, Vermont, Virginia, Washington and Wisconsin. (In South Carolina and Michigan, citizens do not register to vote by party, please note, meaning that all voters in those states are "independent," technically. Voters in those states can only vote in the primary election of one political party, though, and not in the primaries of multiple parties.) The elections in those states are referred to as "open primaries," while states that don't allow registered independents to participate have "closed primaries." If there is a runoff to follow a primary in most of those "open primary" states, an independent voter can only vote in the runoff elections of the same party whose primary they voted in. In addition, the Democratic Party in the states of California, Kansas, Montana, Utah and West Virginia allow registered independents to participate in their primary elections.
No it is closed. People may vote in a party's primary only if they are registered members of that party prior to election day. Independents cannot participate. Note that because some political parties name themselves independent, the term "non-partisan" often replaces "independent" when referring to those who are not affiliated with a political party.
A closed-vote primary (restricted to party members)
New Jersey holds primary elections rather than caucuses. In these primaries, registered party members can vote for their preferred candidates to represent their party in the general election. New Jersey's primary system is closed, meaning that only registered party members can vote in their party's primary election.
Primaries are closed. Republicans and Democrats only vote for their candidates. Independents etc. can still vote in the primary only for public questions. Independents etc. can vote for who they want only in the general election. If an Independent is running in the primary you can only vote that parties candidate. The same with Green Party etc.
In an open primary anyone can vote for any candidate in either party regardless of whether they are registered democrat or republican. In a closed primary you can only vote for someone in your registered party.
Voting in a CLOSED primary (apex)