The first formula is the sample variance, which generally is: $\hat \sigma_{n}^{2} = \frac{1}{n-1}\sum_{i=1}^{n} (x_{i}-\bar x)^2$ whereas the second formula is the population variance: $\hat \sigma_{n}^{2} = \frac{1}{n}\sum_{i=1}^{n} (x_{i}-\bar x)^2$ the only difference is in the denominator, with the sample formula correcting for the bias in small samples. Note that for large $n$, the two formulas give essentially the same value, but for small samples, the sample mean $\bar x$ is likely be much closer to the sample data than the true mean $\mu$ will be, so using the population formula will underestimate the variance, on average.
As for a proof, look up unbiased estimator (UE) of the variance. You will see that the sample variance formula has an expected value equal to the true variance. As far as it being the "best" estimator, in general, there is no single "best" estimator, it depends on your assumed sampling distribution. For example, the sample variance is the minimum variance unbiased estimator for normally distributed data. However, there are other ways to define "best" such as maximum likelihood or maximum posterior probability for maximum likelihood and Bayesian estimation, respectively.
Hope that helps.