General Formula
The general formula for the $n\text{th}$ moment for a function $f(x)$ (from https://en.wikipedia.org/wiki/Moment_(mathematics)) is
$$
\mu_n = \int_{-\infty}^\infty (x - c)^n f(x) dx
$$
where $c = 0$ if you're calculating the first moment (the mean),
and $c = $ the mean otherwise.
With $k$ data points, this can be estimated as
$$
\hat \mu_n = E[ (x - c)^n ] = \frac{\sum_i^k(x_i - c)^n}{k}
$$
For statistical purposes, you'll want to look into the Standardised moments
How much data
At minimum, you need $n$ data points to have an estimate the $n$th moment. You need one to estimate the mean, 2 for the variance, 3 for skew, and so on. Obviously, these will be extremely poor estimates, since these are the absolute minima.
Confidence Intervals
Calculating confidence intervals for higher-order moments in general is tricky. Wright and Herrington (2011) provide a way of estimating them using bootstrap samples.