Quite simply, a box squat is a barbell squat performed with a raised platform behind the athlete to enable them to gauge their squatting depth.
As with the traditional squat, the quadriceps, hamstrings and glutes are the primary target of the exercise, although to what degree these knee and hip extenders contribute is somewhat down to the stance and depth of the squat. A deeper, wider stance is likely to place greater forces on the hip, therefore causing greater engagement of the hamstrings and glutes.
The athlete should never sit on the box, as doing so would place tremendous stress through the spine, not to mention take tension away from the target muscles. Instead, the box is there to aid the athlete in knowing how deep they have squatted, brushing the box with their backside before forcefully extending the legs and hips to ascend.