On most properties Yardmasters are contract (union) employees. They supervise movement within a yard. In large terminals, they may only control a portion of a yard - large hump facilities will often have separate YMs for the Arrival/Departure yards and Hump. In smaller terminals, they can be responsible for the main yard and any minor outlaying yards.
Yardmasters are typically the first point of contact for the crews, customers, and other railroad departments. They plan for the arrival and departure of road trains and transfer runs, create switchlists for yard and local crews, handle customer car requests, and verify Right Car Right Train, and Car Standing and ensure that trains are properly built. Some places, YMs also track 30/60/90 Hour cars, and handle power assignments.
Trainmasters are non-contract employees, - Company Officers. They are tasked to conduct Operational Tests, respond to and investigate incidents, and assess disciplinary action. They may also represent the Company to the public.
Line of Road Trainmasters are responsible for a given section of track, usually between major terminals. They respond to incidents, UDEs (undesired emergency brake application), derailments, broken knuckles, grade crossing and trespasser strikes, etc. They also handle line of road customer issues.
Terminal Trainmasters are responsible for a terminal, and supervise the Yardmasters. They have the same general duties as a YM, plus the added Officer duties. Many places the Trainmasters, handle the power assignments, and also crew balancing.
The Roadmaster, is the MoW supervisor for a given section of track.
Nick