In this video I explain the basis of the mavlink command protocol by showing how you command takeoff to an ardupilot drone
Example code available here:
https://github.com/Intelligent-Quads/iq_pymavlink_tutorial
Mavlink Command Docs:
https://mavlink.io/en/services/command.html