Either treadles, where they detect the train by 'sensing' when the wheels pass through, or by the signalman actually operating them manually by clearing the signal in rear, which is the case with most 'automatic' crossings controlled by large PSB/IECCs...
On smaller crossing boxes, however, they are usually operated manually, and some aren't even interlocked with the signals at all, with the crossing being controlled by the signalman.
Depends what Sort Of Level Crossing you are designing, as there are various sorts, all depending on the amount of Road and Rail Traffic.
There is manually Controlled Barriers which are operated my a signalman (sorry Person, have to be PC) at the LC, who lowers and raise the barriers on a small panel in the box. some of these panels can be more complecated, and have auto raise, or can operate different parts of the LC, like Lights only. They Usually either have a button on the panel, of a lever if its a lever frame to say the crossing is clear.
CCTV works similer, but is controled remotely, using CCTv to make sure the LC is Clear.
Once either the Locking Leaver, or Clear Button is Cleared, The Signals can be cleared.
AHB crossings work by either seperate TCs or Tredles. once triggered these start of the LC sequence for an automatic crossing, which is
Amber light for 3 seconds
Twins Reds Start to Flash, then 4-8 seconds laters barriers come down, which takes about 6-8 seconds
No less than 27 seconds after the amber shows on the crossing can the train then cross.
Barriers Raise, Unless 10 seconds can elapse before the next train triggers it all off.
AHBs are mointed at a control point, but dont usually have protecting signals, but they will havea detection in the box to show whether barriers are up or down
And then theres ABCL, AOCL, Gated Crossings Etc, but its too late to go into detail about all that