A good definition can be found in the Encyclopedia Britannica, namely an officer on the personal staff of a general, admiral, or other high-ranking commander who acts as his confidential secretary in routine matters.
On Napoleon’s staff such officers were frequently of high military qualifications and acted both as his “eyes” and as interpreters of his mind to subordinate commanders, even on occasion exercising delegated authority.
In modern times aides-de-camp are usually of junior rank and their duties largely social.
Military, naval, and air force officers, frequently of high rank, who act as aides to chiefs of state, such as kings or presidents, are also called aides-de-camp.
In many countries, the word adjutant is used for aide-de-camp and adjutant general for a royal aide-de-camp.