The title chief of staff (or head of staff) identifies the leader of a complex organization such as the Armed Forces, institution, or body of persons and it also may identify a principal staff officer (PSO), who is the coordinator of the supporting staff or a primary aide-de-camp to an important individual, such as a president, or a senior military officer, or leader of a large organization. It is almost never used in a civilian context.
In general, a chief of staff provides a buffer between a chief executive and that executive's direct-reporting team. The chief of staff generally works behind the scenes to solve problems, mediate disputes, and deal with issues before they are brought to the chief executive. Often chiefs of staff act as a confidante and advisor to the chief executive, acting as a sounding board for ideas. Ultimately the actual duties depend on the position and the people involved.
In general, the positions listed below are not "chiefs of staff" as defined at the top of this page; they are the heads of the various forces/commands and tend to have subordinates that fulfill the "chief of staff" roles.
The Sovereign is the Commander-in-Chief. The CDS heads the Chiefs of Staff Committee and is assisted by the Vice-Chief of the Defence Staff. Queen Elizabeth II is the head of each branch of the British Armed Forces; members of the Royal Air Force and the Army take an oath of loyalty to the Sovereign, whereas members of the Royal Navy, being the oldest of the three services and established by the sovereign's prerogative, have never been required to swear allegiance but they do sign an attestation or engagement form on entry. The same applies to the Royal Marines.