Definition
If is random sample from then the moment of the sample is given by
Number of moments to calculate
You need moments if you wish to estimate parameters.
Now let us walk through an example.
Example
\end{align*}
\begin{align*} E[X] &= \mu \ E[X^2] &= \sigma^2 + \mu^2 \end{align*}
\begin{align*} E[X] = m_{1} &\implies \hat{\mu}{MME} = \sum \frac{x{i}}{n} \ E[X^2] = m_{2} &\implies \hat{\sigma}^2 + \hat{\mu}^2 = \sum \frac{x_{i}^2}{n} \ &\implies \hat{\sigma^2} = \sum \frac{x_{i}^2}{n} - \hat{\mu}^2\ &\implies \hat{\sigma^2} = \sum \frac{x_{i}^2}{n} - \left( \sum \frac{x_{i}}{n} \right)^2 \ &\implies \hat{\sigma^2}{MME} = \sum \frac{(x{i} - \bar{x})^2}{n} \end{align*}
For another example see gamma distribution.