What would happen when a write-in candidate wins an election? What would happen in a presidential election, US congressional elections, and generally as you go further down ticket? What would happen if enough people pencilled in Jill Stein for president in states where she didn't qualify for the ballot, or Bernie Sanders after he has conceded the race? What would happen if someone who never expressed any interest in politics won, or a fictitious person won?
I imagine the myriad state and local jurisdictions all have their own elections rules but I'm hoping their rules are generally the same, so I'm looking for a general answer.