A tamping machine or ballast tamper is a machine used to pack (or tamp) the track ballast under railway tracks to make the tracks more durable. Prior to the introduction of mechanical tampers, this task was done by manual labour with the help of beaters. As well as being faster, more accurate, more efficient and less labour-intensive, tamping machines are essential for the use of concretesleepers since they are too heavy (usually over 250 kg (551 lb)) to be packed into the ballast by hand.

Early machines only lifted the track and packed the ballast. More modern machines, sometimes known as a tamper-liner or tamping and lining machine, also correct the alignment of the rails to make them parallel and level, in order to achieve a more comfortable ride for passengers and freight and to reduce the mechanical strain applied to the rails by passing trains.

The majority of track machines are powered by a diesel engine. This provides power to the driving wheels via a cardan shaft, allowing the machine to propel itself to and around a work-site. The engine also drives an hydraulic pump to provide power for the various tools.

For each rail there is a tamping unit attached to the main frame by means of vertical guide columns and a lifting and lowering hydraulic cylinder. The tamping unit consists of tamping tools (arms or "tines"), a hydraulic vibration motor, a vibration shaft and an eccentricflywheel. For each sleeper, a tamping unit is provided with four pairs of tamping arms: one each side of the sleeper, i.e., 16 tamping arms are used for tamping a single sleeper.[vague] To process several sleepers simultaneously, a tamping unit may have between 32 and 64 arms (for up to four sleepers), leading to the derivation of machine type numbers: "16" indicates 16 tines, enough for a single sleeper, "32" for two sleepers. Machines capable of processing greater amounts of sleepers per movement are now labelled by the Plasser 'X' methodology. 09-2X for two sleepers, 09-3X for three sleepers and 09-4X for four, etc.

This type of straight-track tamping machine is the oldest of the varieties. It uses a two-chord lining system for alignment of track (for slewing the track to left or right, as-and-when required). This type of lining is controlled mechanically. The machine has four bogies, one at the front, one at the rear, a third in the centre and a fourth in between the centre and the rear. They are called: front-tightening, rear-tightening, lining bogie and measuring bogie, respectively.

The measuring bogie determines the amount of slewing required and measures the subsequent adjustments applied by the lining bogie. The lining bogie also lifts the track to make it level. The tamping bank behind the lining bogie has a vibrating motor and four arms for each rail.

A tamping cycle comprises three operations:

Penetration – The arms are pushed down vertically into the ballast either side of a sleeper.

Squeezing – The arms squeeze the ballast under the sleeper, packing it together.

Moving – The arms are lifted and the machine is moved to the next sleeper to repeat the cycle.

The operations are controlled from the control cabin by an operator using three pedals, while the lining bogie holds the track in its lifted and slewed position.

The 'Tamping Express' is a machine developed by Plasser & Theurer, and in the UK & Europe is referred to as the 09-3X. This machine consists of a conventional CAT style satellite with tooling for 3 sleepers in continuous succession, along with a full DTS stabilising unit suspended from the rear most vehicle in the machine.[2]

Tamping and cleaning operations have the adverse effect of reducing the resistance of the track to lateral movement. The resistance gradually recovers with the passage of trains, but may require a speed restriction imposed for the duration. This 'consolidation' can be achieved faster and in a more controlled manner using mechanised equipment known as the Dynamic Track Stabiliser (DTS).

A DTS will normally be used only after a stretch of track has been tamped and aligned.

D.G.S. has a vibrating unit which holds the track in position and applies a horizontal vibration and vertical load to simulate the passage of trains. The track parameters (or cross levels), before and after stabilising, can be viewed through bogies in the front and rear.

Dynamic Track Stabilising has the following advantages, resulting in enhanced safety: