A confidence interval (CI) is a statistical concept used to estimate the range within which a population parameter, such as the mean average, is likely to fall.
A population parameter is typically a quantity being estimated in statistical research, such as the population mean, proportion, variance, etc.
Confidence Intervals (often abbreviated to CI) are expressed as an interval estimate accompanied by a level of confidence (e.g. "95% CI: 1.12-1.85"). The level of confidence represents the probability that the true parameter lies within the interval provided. In the above example, the level of confidence is 95% and the interval is 1.12-1.85. This means the available evidence leaves a 5% chance the true parameter value is outside this interval.
This can be compared to a p-value, which is likewise a level of confidence, but of a different property of data and/or a model. For example, you might generate a p-value regarding whether a particular result is due to a real characteristic of the population, and not a chance artefact of the sampled data.
Both Confidence Intervals and P-values attempt to describe the limits of certainty that can be reliably inferred from a sample of the true population, given various assumptions.
The formula for constructing a confidence interval depends on the type of parameter being estimated and the distribution of the sample data. For example, for estimating the mean of a population with a known standard deviation, the confidence interval is often constructed using the z-distribution. If the standard deviation is unknown or the sample size is small, the t-distribution might be used.
Further information about the derivation of confidence intervals for specific situations can be found here.