What are Primaries?

Primaries are generally known as the election for the presidential candidates. For example, if three democratic candidates were in the running, the primaries would narrow that to one democratic candidate.