How does a caucus work?
They don't! (Just kidding. But seriously, folks.)
The nomination of candidates by political parties can be quite a strange process, and it varies not only by party but also by state.
Generally we can break down nomination procedures into two types: Primaries, in which voters directly vote for the candidate they want, and caucuses, which are a lot more complicated.
Whereas a primary functions basically like any other election---you wait in line, get your ballot, fill in your bubble, turn it in and go---a caucus is a much longer process, in which a smaller number of people have to make a much larger commitment.
Caucuses also vary somewhat. The Iowa caucuses are usually the first in the US, so I'll use them as a representative example.
The Republican caucus in Iowa is relatively straightforward; people show up, the candidates give some last-minute speeches, maybe answer a few questions, and then everyone casts a vote. Delegates are assigned based on those votes, and we're done.
The Democratic caucus is a lot more complicated. People start by declaring the candidate they prefer, where "Uncommitted" is an option. There's a threshold process, where you have to win a certain number of voters in order to be considered a viable candidate to move on to the next phase.
Candidates who fail to meet the threshold are removed. Anyone who declared support for them now has to move to someone else. If there are still "Uncommitted" people, they have to choose a side. There can be much arguing during this process. (In some states, you can remain "Uncommitted" all the way, and then nobody gets your delegates.)
Then, at last, delegates are chosen based on the votes that each candidate received. This whole process typically takes several hours.
The advantage of a caucus is that these are always committed, engaged voters---people who really care about the outcome and understand the issues, rather than people who are just casually showing up to vote whichever name says "D" or "R". But the disadvantages are that this is a much smaller portion of the electorate---which seems undemocratic---and sometimes (e.g. in the Democratic caucus in Iowa) it's not even a secret ballot, so social pressure can manipulate people's votes.