Appointment: The state's governor or legislature will choose their judges.
Merit Selection: Judges are chosen by a legislative committee based on each potential judge's past performance. Some states hold "retention elections" to determine if the judge should continue to serve.
Partisan Elections: Judges selected through partisan elections are voted in by the electorate, and often run as part of a political party's slate of candidates.
Non-Partisan Elections: Potential judges that run for a judicial position in states with non-partisan elections put their names on the ballot, but do not list their party affiliates. Terms for judges in non-partisan elections can range between 6 and 10 years.
Source: FindLaw