If you are talking about U.S. Undersecretaries, they tend to stay 2-4 years or more if the President is reelcted. Our major appointments are: Cabinet Secretary, Deputy Secretary, Undersecretary, and Assistant Secretary. These are all presidentially appointed, Senate confirmed positions. Other Senate confirmed appointments include CFO of major Departments and various heads of independent agencies. In addition there are “Schedule C” appointees who do not require Senate confirmation. These can vary from personal secreatries for Senior appointees to senior advisors and chiefs of staff.
Robert is correct that most of the direct interaction between bureacrats and elected officials takes place through the appointees and often through the Schedule C level. Probably one of the most critical relationships is between the Assistant Secretaries (senate confirmed appointee) and the General Deputy Assistant Secretaries (Senior Cival Service). Another critical relationship would be between the Chief of Staff of the Committee of Jurisdiction (serves at the plaesure of the Congressman or Senator who chairs the commitee) and the senior cival servent in the department or agency.
In many ways, the most interesting assignments are the Schedule C special assistant and senior advisors. You are usually working at the intersection of the appointee and the civil service world and see the best and worst of both. It is often a trial by fire but can be one of the best learning experiences a public servent can have.