Long run and short run

In economics the long-run is a theoretical concept in which all markets are in equilibrium, and all prices and quantities have fully adjusted and are in equilibrium. The long-run contrasts with the short-run, in which there are some constraints and markets are not fully in equilibrium.
More specifically, in microeconomics there are no fixed factors of production in the long-run, and there is enough time for adjustment so that there are no constraints preventing changing the output level by changing the capital stock or by entering or leaving an industry. This contrasts with the short-run, where some factors are variable (dependent on the quantity produced) and others are fixed (paid once), constraining entry or exit from an industry. In macroeconomics, the long-run is the period when the general price level, contractual wage rates, and expectations adjust fully to the state of the economy, in contrast to the short-run when these variables may not fully adjust.
History.
The differentiation between long-run and short-run economic models did not come into practice until 1890, with Alfred Marshall's publication of his work Principles of Economics. However, there is no hard and fast definition as to what is classified as "long" or "short" and mostly relies on the economic perspective being taken. Marshall's original introduction of long-run and short-run economics reflected the ‘long-period method’ that was a common analysis used by classical political economists. However, early in the 1930s, dissatisfaction with a variety of the conclusions of Marshall's original theory led to methods of analysis and introduction of equilibrium notions. Classical political economists, neoclassical economists, Keynesian economists all have slightly different interpretations and explanations as to how short-run and long-run equilibriums are defined, reached, and what factors influence them.
Long run.
Since its origin, the "long period method" has been used to determine how production, distribution and accumulation take place within the economy. In the long-run, firms change production levels in response to (expected) economic profits or losses, and the land, labour, capital goods and entrepreneurship vary to reach the minimum level of long-run average cost. A generic firm can make the following changes in the long-run:
The long-run is associated with the long-run average cost (LRAC) curve in microeconomic models along which a firm would minimize its average cost (cost per unit) for each respective long-run quantity of output. "Long-run marginal cost" ("LRMC") is the added cost of providing an additional unit of service or commodity from changing capacity level to reach the lowest cost associated with that extra output. LRMC equalling price is efficient as to resource allocation in the long-run. The concept of "long-run cost" is also used in determining whether the firm will remain in the industry or shut down production there. In long-run equilibrium of an industry in which perfect competition prevails, the LRMC = LRAC at the minimum LRAC and associated output. The shape of the long-run marginal and average costs curves is influenced by the type of returns to scale.
The long-run is a planning and implementation stage. Here a firm may decide that it needs to produce on a larger scale by building a new plant or adding a production line. The firm may decide that new technology should be incorporated into its production process. The firm thus considers all its long-run production options and selects the optimal combination of inputs and technology for its long-run purposes. The optimal combination of inputs is the least-cost combination of inputs for desired level of output when all inputs are variable. Once the decisions are made and implemented and production begins, the firm is operating in the short-run with fixed and variable inputs. Another part of the development of planning what a firm may decide if it needs to produce more on a larger scale or not is Keynes theory that the level of employment(labor), oscillates over an average or intermediate period, the equilibrium. This level of fixed capital is determined by the effective demand of a good. Changes in the economy, based on capital, variable and fixed cost can be studied by comparing the long-run equilibrium to before and after changes in the economy.
In the long-run, consumers are better equipped to forecast their consumption preferences. They have ample time to make decisions, and therefore will act with a System 2 style of thinking which is more thought-out, planned, and rational. When consumers act this way, their utility and satisfaction improves.
Short run.
All production in real time occurs in the short-run. The decisions made by businesses tend to be focused on operational aspects, which is defined as specific decisions made to manage the day to day activities in the company. Businesses are limited by many things including staff, facilities, skill-sets, and technology. Hence, decisions reflect ways to achieve maximum output given these restrictions. In the short-run, increases and decreases in variable factors are the only things that can affect the output produced by firms. They could change things such as labour and raw materials. They are not able to change fixed factors such as buildings, rent, and know-how since they are in the early stages of production.
Firms make decisions with respect to costs. In the short-run, the variation in output, given the current level of personnel and equipment, determines the costs along with fixed factors that are unavoidable in the early stages of the firm. Therefore, costs are both fixed and variable. A standard way of viewing these costs is per unit, or the average. Economists tend to analyse three costs in the short-run: average fixed costs, average variable costs, and average total costs, with respect to marginal costs.
The average fixed cost curve is a decreasing function because the level of fixed costs remains constant as the output produced increases. Both the average variable cost and average total cost curves initially decrease, then start to increase. The more variable costs used to increase production (and hence more total costs since TC=FC+VC), the more output generated. Marginal costs are the cost of producing one more unit of output. It is an increasing function due to the law of diminishing returns, which explains that is it more costly (in terms of labour and equipment) to produce more output.
In the short-run, a profit-maximizing firm will:
The decisions of the firm impacts consumer decisions. Since there are constraints in the short-run, consumers must make decisions in quick time with respect to their current level of wealth and level of knowledge. This is similar to Daniel Kahneman’s System 1 style of thinking where decisions made are fast, intuitively, and impulsively. In this time frame, consumers may act irrationally and use biases to make decisions. A common bias is the use short-cuts known as heuristics. Due to differences in various situations and environments, heuristics that may be useful in one area may not be useful in other areas and lead to sub-optimal decision making and errors. Thus, it becomes difficult for businesses, who are tasked to forecast the demand curves of consumers, to make their own ideal decisions.
Transition from short run to long run.
The transition from the short-run to the long-run may be done by considering some short-run equilibrium that is also a long-run equilibrium as to supply and demand, then comparing that state against a new short-run and long-run equilibrium state from a change that disturbs equilibrium, say in the sales-tax rate, tracing out the short-run adjustment first, then the long-run adjustment. Each is an example of comparative statics. Alfred Marshall (1890) pioneered in comparative-static period analysis. He distinguished between the temporary or market period (with output fixed), the short period, and the long period. "Classic" contemporary graphical and formal treatments include those of Jacob Viner (1931), John Hicks (1939), and Paul Samuelson (1947). 
The law is related to a positive slope of the short-run marginal-cost curve.
Macroeconomic usages.
The usage of "long-run" and "short-run" in macroeconomics differs somewhat from the above microeconomic usage. John Maynard Keynes in 1936 emphasized fundamental factors of a market economy that might result in prolonged periods away from full-employment. In later macroeconomic usage, the long-run is the period in which the price level for the overall economy is completely flexible as to shifts in aggregate demand and aggregate supply. In addition there is full mobility of labor and capital between sectors of the economy and full capital mobility between nations. In the short-run none of these conditions need fully hold. The price level is sticky or fixed in response to changes in aggregate demand or supply, capital is not fully mobile between sectors, and capital is not fully mobile across countries due to interest rate differences among countries and fixed exchange rates.
A famous critique of neglecting short-run analysis was by Keynes, who wrote that "In the long run, we are all dead", referring to the long-run proposition of the quantity theory of money, for example, a doubling of the money supply doubling the price level.