So, the confidence interval is an interval which you hope contains the population parameter. This interval would have:
The question is, where does the spread come from?
The interval is defined as:
$$\hat{p} \pm z^*\text{s.e.}(\hat{p})$$
where:
$$\text{s.e.}(\hat{p}) = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$$
and \(z^ *\) is the z multiplier associated with the confidence interval. For example, the z multiplier for a 95% confidence interval is 1.96.