Answer:
It can depend on what type of judge you are asking about. Most federal judges are appointed (essentially) for life unless they commit judicial malfeasance or commit a felony. State and county judges may be appointed as the constitutions of their state specify. Some occupy appointive positions, while other are elected by popular vote.