Only registered Democrats can vote in a Democratic primary election, where the Democratic party selects its candidates for a general election.
Only registered Republicans can vote in a Republican primary election, where the Republican party selects its candidates for a general election.
Party registration plays no role in a General election: you can vote for anyone, even if they are not a member of your own party.
Voter registration (as opposed to party registration) is simply a declaration of your residency and thus eligibility to vote in elections at the state, county, city, congressional district, school district, ward, and possibly even lower level elections. (Three homeowners on my small, dead-end dirt road are the only ones eligible to "vote" on whether a special tax should be assessed against our properties to pave our road. )