Moving Averages:
First thing we would like to expose about moving averages is that they do not predict the future prices but instead shows the trend of the running markets using past prices. Simple Moving Average (SMA) and Exponential Moving Averages (EMA) are the most familiar moving averages where as Weighted Moving Average (WMA) is not well known.
Simple Moving Average:
The name itself mentions the calculation part of this type moving average. For instance, a 5 day simple moving average is calculated by adding previous 5 day closing prices and dividing it by the number of periods taken (5). This will be the calculation on 6th day.
For the calculation on the seventh day, the number of period remains same as we are calculating for a 5 day SMA whereas the sixth (previous) day is taken into consideration dropping the first day. Same continuous on the 8th day.
How Moving Averages are used:
Moving averages can be used solely or in combination with other MA. Normally used Moving averages are 5,10,20,50,100 and 200.
In general, 50 periods moving average is used for medium term whereas 200 moving averages are said to hold ultimate support/resistance levels. If the stock cuts 200 Day moving average, it shows that the market is very much in a weak trend. As well, it the stock breaks 200 DMA on the upper side, it means that we are heading towards a strong bull phase.
Price Crossovers:

In the chart shown, the moving average is solely used with the closing prices. If the closing market price if above the moving average, we may head towards an upward trend which indicates bullish phase. If the closing price is below the average moving price, it indicates that markets are weak.
Double Crossovers

Many analysts also go with 2 averages along with cmp candles, waiting for double confirmation. But this method is said to have a disadvantage of showing the trend after much of the part is completed.
When a shorter period moving average crosses longer period moving average in the upside, it’s said to a bullish crossover, also termed as Golden cross. When a shorter period moving average crosses longer period moving average in the downside, its said to be a bearish crossover, also termed as Dead Cross.
Moving averages can also be used with combination of both SMA and EMA. Point to remember while analyzing with both the moving averages, that movement of EMA is faster than the movement of SMA. In short, if both averages are plotted over a chart, SMA curves only after EMA does.
It is said that longer the analyzing period, longer the moving average to be taken. For instance, for a long term period, a moving average of 100 may suit though there is no well proved strategy for picking the averages. The reason is that the longer moving average is not affected by the short term movements, giving more clarity towards the long term.