A double track railway usually involves running one track in each direction, compared to a single track railway where trains in both directions share the same track.
In the earliest days of railways in the United Kingdom, most lines were built as double track because of the difficulty of co-ordinating operations prior to the invention of the telegraph. The lines also tended to be busy enough to be beyond the capacity of single track anyway.
In the earliest days of railways in the United States, most lines were built as single track for reasons of cost, and very inefficient timetable working systems were employed to prevent head-on collisions on single lines. This improved with the development of the telegraph and the train order system.
In any given country, rail traffic generally runs to one side of a double track line, not always the same as road traffic. Thus in Belgium, China, France (apart from the former German Alsace and Lorraine), Sweden, Switzerland and Italy for example, the railways use left hand running, while the roads use right hand running.
On the French-German border, for example, flyovers are provided so that train moving on the left in France end up on the right in Germany and vice versa.
Double track railways, especially older ones, use each track exclusively in one direction. This simplifies the signalling systems, especially where the signalling is mechanical.
Where the signals and points are power operated, it can be worthwhile to signal each line in both directions, so that the double line becomes a pair of single lines. This allows trains to use one track where the other track is out of service due to track maintenance work, or a train failure, or for a fast train to overtake a slow train. See single-line working for a discussion of this topic.
Most crossing loops are not regarded as double track even though they consist of multiple tracks. If the crossing loop is long enough to hold several trains, and to allow opposing trains to cross without slowing down or stopping, then that may be regarded as double track. A more modern British term for such a layout is an extended loop.
The distance between the track centres makes a difference in cost and performance of a double track line. The track centres can be as narrow and as cheap as possible, but maintenance must be done on the side. Signals for bi-directional working cannot be mounted between the tracks so must be mounted on the 'wrong' side of the line or on expensive signal bridges. Very narrow track centres are also undesirable for high speeds, as pressure waves knock each other as high speed trains pass.
Narrow track centres might be 4 m or less. Narrow track centres may have to be widened on sharp curves to allow for long rail vehicles following the arc of the curve, and this increases a surveyor's workload. Widening a track centre to 5 m or so suits high speed trains passing each other, and eliminates the need to widen the centres on sharp curves. Increaasing width of track centres of 6 m or more makes it much easier to mount signals and overhead wiring structures.
Very wide centres at major bridges can have military value. It also makes it harder for rogue ships and barges knocking out both bridges in the same accident.
Railway lines in desert areas affected by sand dunes are sometimes built on alternate routes so that if one is covered by sand, the other(s) are still serviceable.
On British lines, the space between the two running rails of a single railroad is called the "Four Foot" (owing to it being 'four foot something' in width), while the space between the different roads is called the "Six foot" (same reason). It is not safe to stand in the Six Foot when trains pass by on both roads, as happened in the Bere Ferrers accident. 
When one track of a double track railway is out of service for maintenance or a train breaks down, all trains may be concentrated on the one good track. There may be bi-directional signalling and suitable crossovers to enable trains to move onto the other track expeditiously (see, for example, the article on the Channel Tunnel), or there may be some kind of manual safeworking to control trains on what is now a section of single track. See single-line working for a discussion of this topic.
Accidents can occur if the temporary safeworking system is not implemented properly:
To improve travel times and increase line capacity the 300km of line between Junee and Melbourne is to partially duplicated in a configuration called Passing lanes. Existing crossing loops are mostly 900m and 1500m long, and these will be enhanced by loops 6000m long which are long enough to be regarded as nearly double track.
The process of expanding a single track to double track is called duplication or doubling.
The strongest evidence that a line was built as single track and duplicated at a later date consists of major structures such as bridges and tunnels that are twinned. One example is the twin Slade tunnels on the Ilfracombe Branch Line line in the United Kingdom. Twinned structure may be identical in appearance, or like some tunnels between Adelaide and Belair South Australia, substantially different in appearance.
Tunnels are confined spaces and are difficult to duplicate while trains keep on running. Generally they are duplicated by building a second tunnel. An exception would be the Hoosac Tunnel which was duplicated by enlarging the bore.
To reduce initial costs of a line that is certain to see heavy traffic in the future, a line may be built as single track but with earthworks and structures designed for ready duplication. An example is the Strathfield to Hamilton line in New South Wales Australia which was constructed as mainly single track in the 1880s, with full duplication only completed around 1910. All bridges, tunnels, stations, and earthworks were built for double track. The former B & O Railroad Washington-Jersey City line now under CSX ownership is an example of a duplication line that was reduced to single track in most locations, but has since undergone duplication in many places between Baltimore, Maryland and Philadelphia, Pennsylvania when CSX increased freight schedules in the late 1990s.
Some lines are built as single track with provision for duplication, but the duplication is never carried out. Examples include:
When the capacity of a double track railway is in excess of requirements, the two tracks may be reduced to one. In some countries this is called singling.
A double track tunnel with restricted clearances is sometimes singled to form a single track tunnel with generous clearances, such as the Connaught Tunnel in Canada or the Tickhole Tunnel in New South Wales, Australia. In the case of the Tickhole Tunnel a new single track tunnel was built and the two tracks in the original tunnel were replaced by one track in the centreline of the tunnel. A notorious case where this was necessary was the Hastings Line in the United Kingdom, where the tunnels were eventually singled to permit the passage of standard British gauge rolling stock (prior to the singling, narrow bodied stock was used, specially constructed for the line).
As part of the Regional Fast Rail (RFR) railway upgrade in Victoria, Australia, the rail line between Kyneton and Bendigo was converted from double- to single-track to provide additional clearance through tunnels and under bridges for trains travelling at up to 160 km/h.
Quadruple track consists of four parallel tracks. On a quad-track line, faster trains can overtake slower ones.
The two tracks of a double track railway do not have to follow the same alignment if the terrain is difficult. At Frampton, New South Wales, Australia the uphill track follows something of a horseshoe curve at 1 in 75 gradient, while the shorter downhill track follows the original single track at 1 in 40 grades. Between Junee and Marina, New South Wales, Australia the two tracks are at different levels, with the original southbound and downhill track following ground level with a steep gradient, while the newer northbound and uphill track having a gentler gradient at the cost of more cut and fill.
An unusual stretch of double track in the west of the United States actually comprises two separate single track lines owned by separate companies. However, the capacity of the two tracks is greatly increased if they are combined and operated as if they were a double track line, and this indeed is what the two companies do. Canadian Pacific and Canadian National are starting to do the same. Another example was in Conshohocken, Pennsylvania where the former Reading Railroad and Pennsylvania Railroad shared lines, and even overhead electrical wire supports, for a 2-mile stretch on the northern bank of the Schyulkill River. Both lines eventually came under Conrail ownership in 1976 with the former PRR line being abandoned and now used as a hike/bike path.
Because double and single track may use different signalling systems it may be awkward and confusing to mix double and single track too often. For example, intermediate mechanical signal boxes on a double track line can be closed during periods of light traffic, but this cannot be done if there is a single line section in between. This problem is less serious with electrical signalling such as Centralized traffic control.