How does the variance measure the information about the data? Variance measures the amount of information in the data set. How?
Mathematically, the variance is the measure of the variability in the data. So, how this can be explained as a measure of the amount of information in the data? Could you please explain this with a simple example?
I read the following post, here, which makes me confused about, how the variance measures the information about the data? I thought it is just a measure of how the point is far away from the mean.

This is not about variance but rather about PCA and principal components. PCA searches for orthogonal principal components (a linear combination of variables) which maximize explained variability (or equivalently minimize the squared distance from the points to the line; think of it as $R^2$ - the higher it is the more variability we explained, which means the points are closer to the fitted line).
When we do this we say that the first PC explains most of the data, i.e. it explains most of the variability, i.e. it contains most of the information about the data, because it's what we can explain best, given our data. However, this does not necessarily mean that this information is of any value to us, the model may be learning associations which are perfectly clear to us or which are not of interest.
In conclusion, this is not about variance, but rather about "explained variance", which is distributed among the PC's and which is interpreted (by some people) as "how much information this particular PC holds given all the rest".
