How did a caucus originally function?

How did a caucus originally function?