To whom are civil servants ultimately responsible?

Okay, let's break down the relationship between civil servants and ministers in the UK government. Think of the government as having two main parts: the politicians we elect, and the civil service. Civil servants are employed by the government to support the elected politicians in developing and implementing policies. They're meant to be politically neutral, offering impartial advice and ensuring that government policies are carried out effectively. Ministers, on the other hand, are politicians – usually Members of Parliament – who are appointed to lead government departments. They're responsible for setting the overall direction and priorities of their department. Because ministers are accountable to Parliament and, ultimately, to the public, civil servants are responsible to them. Ministers are the ones who answer for the actions of their departments, so civil servants work under their direction to ensure policies align with the government's agenda. It's a hierarchical structure designed to ensure democratic accountability. While civil servants might interact with other parties or members of parliament, their primary responsibility lies with the ministers leading their department.
Imagine ministers as the captains of the ship, and civil servants as the crew, working under their direction.