There are many tutorials and examples on how to connect and read a potentiometer with an arduino.
To connect the arduino to the pixhawk, use a serial connection.
You will have to use the mavlink protocol to transmit the data from the arduino to the pixhawk. There is a thread here in the forum, where you can learn how to make the arduino talk mavlink.