How do pixhawk and Arduino communicate each other?

I’m doing a project on collision avoidance drone, for that I’m using pixhawk flight controller and Arduino Uno. Can anyone pls tell me how do those two communicate each other? I heard that Mavlink is used for that. But I’m too new to this. Is the Mavlink a coding language like c,c++. If yes then where should I dumb that code? To the Arduino or pixhawk? If I need to change the pixhawk code then what about Arduino? And my aim is that if a sonar detects a wall then Arduino should able to tell pixhawk to move right side. How to write code for that using Mavlink communication? I’m totally confused!! Pls pls pls anyone help me and thank you so much.

Hello
You may take a look at this: Basic Obstacle Stop System-Build Log and firmware

Tq ppoirier for your reply. I want to make an obstacle avoidance drone using Arduino. Can u tell me what code do I need to install in Arduino such that it can communicate with the pixhawk and also what is the source to learn that code?
Thank you.