After months of campaigning and lots of twists and turns along the way, millions of Americans exercised their right to vote.