See Full Constitution
Article V

Section 15. Tenure of justices, judges and justices of the peace

(a) The regular term of office of justices and judges shall be ten years and the regular term of office for judges of the municipal court in the City of Philadelphia and of justices of the peace shall be six years. The tenure of any justice or judge shall not be affected by changes in judicial districts or by reduction in the number of judges.

(b) A justice or judge elected under section 13(a), appointed under section 13(d) or retained under this section 15(b) may file a declaration of candidacy for retention election with the officer of the Commonwealth who under law shall have supervision over elections on or before the first Monday of January of the year preceding the year in which his term of office expires. If no declaration is filed, a vacancy shall exist upon the expiration of the term of office of such justice or judge, to be filled by election under section 13(a) or by appointment under section 13(d) if applicable. If a justice or judge files a declaration, his name shall be submitted to the electors without party designation, on a separate judicial ballot or in a separate column on voting machines, at the municipal election immediately preceding the expiration of the term of office of the justice or judge, to determine only the question whether he shall be retained in office. If a majority is against retention, a vacancy shall exist upon the expiration of his term of office, to be filled by appointment under section 13(b) or under section 13(d) if applicable. If a majority favors retention, the justice or judge shall serve for the regular term of office provided herein, unless sooner removed or retired. At the expiration of each term a justice or judge shall be eligible for retention as provided herein, subject only to the retirement provisions of this article.