There's a variety of programs that offer demo versions, most are limited to only allow 3 trains or only so many track symbols on the track plan or so many turnouts etc, but for testing purposes it works fine.
The more popular ones are Traincontroller (
http://www.freiwald.com/pages/traincontroller.htm) which comes in both English and German, Railware (
http://www.railware.de/) which comes in English and German as well I believe, but the page is German only, and Win-Digipet (
http://www.windigipet.de/) which comes in English and German as well.
Of those, Railware is the most advanced, it's used by for example Miniatur Wunderland in Hamburg, which is the largest model train layout in the world (
http://www.miniatur-wunderland.com/). It's also the most expensive of the 3. Traincontroller generally gets very good reviews for being both user friendly, and the easy ability to switch a locomotive between automatic and manual controls.
My father uses a program called Koploper, which is free but only available in Dutch. He has about 17-18 trains on the layout on any given time, about 7-8 of those can be moving at the same time. Trains are set up as express, freight, heavy freight, local, etc. They also have routes assigned to them, so certain train types can only get to certain tracks in the main station. Express trains have a 25% chance of stopping at the main station but will never stop at the smaller station, freight trains will always prefer a track not directly next to a platform, local trains will always stop at a station etc. They also have smooth acceleration and deceleration, and there's a small shadow station as well where some trains can be parked. I could put up a post at some point with screenshots from the program, and some explanation of the basics, although I'm no expert in setting up blocks and computer control, my father's layout was the first attempt for the both of us ;)