Squats can be much more difficult with a barbell, so if it's your first time, it's best to ask for a trainer's guidance. For back squats, the weight rests on the back (in two positions: low or high) where it's generally easier to squat a heavier load. The hands should be facing forward, along the same plane as the shoulders, with elbows pointing down to the ground (the arms will form a W along the bar). Make sure to keep the barbell over the center of the feet to keep the hips going back, and follow the same form for a bodyweight squat (you know, minus holding your arms out of course).
This squat is a much more advanced movement and requires placing a barbell across the collar bones (resting on the deltoid muscles). It also requires more flexibility than other versions, so it's often best to master the bodyweight and back squats first. The elbows should point straight out (the upper half of the arm parallel with the floor) while the fingertips reach back to grip under the bar, outside of the shoulders. While it may seem unstable to hold the bar with just the fingertips, the arm positioning forms a solid shelf, so the hands mostly prevent the bar from rolling. As long as the elbows stay up, extending straight out from the shoulders, the bar will be secure. Follow the bodyweight squat instructions for the rest of the move.