Phil, there are two sets of judges in the US: Federal and State. Federal judges, both trial and appellate, are appointed for life, as per our constitution (Article II). Federal courts are courts of "limited jurisdiction", so they don't hear many cases such as family law, or disputes between two parties of the same state. Federal courts are limited to cases where there's a diversity of citizenship (parties of different states), or a "federal question", a suit that calls into question federal law or constitutional law (e.g., federal criminal law, or abortion, because of it's constitutional elements).
State judges are often elected, although in some states they're appointed by the legislature (such as Virginia). But only a handful have partisan elections, where the candidate runs as a Republican or Democrat.
The founders were wise to include Article II - the judges for life clause - as that gives judges the freedom to do the right thing. And many judges do just that.
Thanks for the explanation. Similar here, except certainly not aligned to a political party.