The pitch of a xylophone bar is governed by the physics of vibrating solids:
This follows the same principle as strings, air columns, and membranes: longer vibrating element = lower pitch. The relationship is roughly inverse: doubling the length lowers the pitch by about an octave (for bars of uniform thickness and material).
Tuners adjust pitch by carefully removing material from the bar's underside (usually the center) to raise it, or by selecting bar length during manufacturing.