They are usually segregated (on public roads, anyway) by gates or barriers.
The vast majority of incidents (they are seldom accidents) on level crossings in the UK are the fault of either motorists or pedestrians failing to adhere to what are fairly simple rules.
My answer to this much earlier question explains my views.
http://www.theanswerbank.co.uk/News/Question928773.html
Of course anything that can be done to protect people from their own stupidity is welcome but too little emphasis is placed on the fact that if the rules are adhered to then such incidents would be greatly reduced.