Wood Stain is a type of paint used to color wood.
Wood stain consists of colourants dissolved and/or suspended in a 'vehicle' or solvent. Vehicle is the preferred term, as the contents of a stain may not be truly dissolved in the vehicle, but rather suspended, and thus the vehicle may not be a true solvent. The vehicle often may be water, alcohol, a petroleum distillate, or a finishing agent such as shellac, lacquer, varnish and polyurethane. Coloured or stained finishes do not typically deeply penetrate the pores of the wood and may largely disappear when the finish deteriorates or is removed.
Pigments and/or dyes are largely used as colourants in most stains. The difference between the two is in the solubility and in the size of the particles. While dyes are molecules that dissolve into the vehicle, pigments are larger than molecules and are temporarily suspended in the vehicle, usually settling out over time. Stains with primarily dye content are said to be 'transparent', while stains with more pigment in them are said to be 'solid' (opaque); some stains may be called 'semi-solid' or 'semi-transparent', and these may be interchangeable terms, and the relative transparency or opaqueness may fall somewhere between the two extremes. Typically, dyes will color very fine-grained woods (such as cherry or maple) while pigments will not color woods such as these as well. Fine-grained woods generally have pores that are too small for the pigments to settle into. As a result, usually pigment-containing stains will also include a small amount of a 'binder' which helps to adhere the pigments to the wood. A common binder would be a drying oil such as linseed oil.
Most commercial stains contain both dyes and pigments, though often in varying colors and ratios (to each other) depending on the desired coloring effect. Additionally, to some extent, the degree to which a stain will color a particular wood may be dependent on the length of time they are left on the wood, with longer exposure times accomplishing deeper coloration. Typically a 'transparent' stain will accentuate the wood grain (as it is transparent), while a more 'solid' stain will tend to obscure the wood grain (as it is more opaque, akin to what we would usually call 'paint'). Pigments, regardless of the suspension agent, will not give much color to very dense woods but will deeply color woods with large pores (e.g. pine).
Gel stains are a late 20th century innovation in stain manufacturing, in that they are high-viscosity liquids and do not 'flow'. This property allows more control during application, particularly when the wood is in a vertical position, which can often cause traditional liquid stains to run, drip, or pool. Gel stains often have limited penetrating ability, as they are thixotropic (a liquid that nevertheless does not 'flow').
A combination of coffee and vinegar or water is natural alternative to synthetic wood stain. 
Stain is composed of the same three primary ingredients as paint (pigment, solvent (or vehicle), and binder) but is predominantly vehicle, then pigment and/or dye, and lastly a small amount of binder. Much like the dyeing or staining of fabric, wood stain is designed to add color to the substrate (wood and other materials) while leaving some of the substrate still visible. Transparent varnishes or surface films are applied afterwards. In principle, stains do not provide a durable surface coating or film. However, because the binders are from the same class of film-forming binders that are used in paints and varnishes, some build-up of film occurs.
The initial application of any paint or varnish is similarly absorbed into the substrate, but because stains contain lower amounts of binder, the binder from a stain resides mainly below the surface while the pigment remains near the top or at the surface. Stains that employ metallic pigments such as iron oxides usually are more opaque; first because metallic pigments are opaque by nature, but also because the particles of which they consist are much larger than organic pigments and therefore do not penetrate as well. Most wood stains for interior uses (e.g. floors and furniture) require a secondary application of varnish or finish for longer-term protection of the wood, and also to adjust for matter or gloss effects. Stains are differentiated from varnishes in that the latter usually has no significant added color or pigment and is designed primarily to form a protective surface film. Some products are marketed as a combination of stain and varnish.
Siding stain is one variety of wood stain with very high viscosity (others can be quite thin). Effectively, siding stains are paints that do not cover as well and do not form a hard film. They are designed to penetrate better and contain binders that are softer and more flexible, allowing them to last longer than harder, more brittle paints. Siding stain protects against solar radiation especially UV radiation, water, fungus including mildew, and insects. Different siding stains are distinguished by the appearance they impart to wood. Certain solvent-based or oil-based siding stains contain small amounts of paraffin wax, which cannot be painted over, although re-staining is still possible.
Applying stains can be very easy or very difficult depending on the type of substrate, type of stain, and the ambient conditions. Fresh, "green" lumber accepts stain poorly, while aged wood absorbs stains relatively well. Porosity of wood can vary greatly, even within the same piece of wood. End grain and bias-cut grain are far more absorbent, thus will accept more pigment and will darken considerably in those areas. The hard ring may absorb differently from the soft ring. The characteristic medullary rays in oak will absorb much less and remain mostly blonde. Woods that have been heavily subjected to paint strippers or washed down with detergents or solvents will have an increased open grain and accept substantially more stain than normal. Woods from different species of trees can have huge variations in how well they take stain. Different wood species stain differently—the overall color and shade is a result of a combination of the stain and properties of the wood. For example, although medium-to-dark stains tend to look blotchy on maple, they get deeper and more glowing on cherry, with a more consistent coloration. Stains that are fast drying will be difficult to apply in hot weather or in direct sunlight. Stains that are slow-drying will be difficult to work with in damp and cold conditions due to a greatly lengthened evaporation and curing period. New lumber, such as pine, can have waxlike sealants put on at the mill that will prevent proper staining; stripping or sanding the surface may be required. White stains composed of metal oxides, namely titanium dioxide and zinc oxide do not penetrate well and remain on the surface. In such cases, wear easily reveals unstained wood. They are also fairly opaque.
Typically, a thorough final sanding of the wood with one suitable grit will "even out" the absorption of the stain. White stain on a bare softwood or oak floor might require a final 'prep' sanding by hand with an orbital/vibrating sander with 80 or 100 grit, whereas certain hardwoods might be orbitally or hand sanded with 220 grit and higher for a darkish organic stain on furniture. Though it is not as durable, "garnet" is by far the preferred sandpaper for hand-sanding bare wood; first because it is a sharper and faster cutting grit, and second because it does not impart color from the grit, as aluminum oxide or silicon carbide can do. Other methods include "rubbing" with rottenstone etc.
In certain cases you need to clean the wood or remove existing stains prior to staining the wood with a commercial stain in order to avoid damaging the wood. This can be the case for both unfinished and finished wood.
There are special consideration when cleaning stained wood. One of the most common stains is water stains on stained wood. Techniques to remove the water stains have been documented that use a hot iron to remove the water stain.
Special caution should be used when trying to remove stains from a stained wood to avoid damaging the original stain. This is especially important with antiques.