Meaning of "Aye, aye, sir"

The reply to an officer’s order signifying that he is understood and will be obeyed (I understand).

Aye, aye, sir Meaning of