As my question says, when I look at the empirical rule for a normal distribution, it says that 95% percent of values lie between 2 standard deviatons but if I look at the z-score for the 95% confidence interval, the z-score is1.96 which is close to 2 standard deviations from the mean but not exactly 2 standard deviations. What does the 95% mean in the both cases?
For the empirical rule, we say “two” because it’s more convenient to say that that to say 1.96. The correct value is 1.96, not two. (Even 1.96 has some amount of rounding.)
The 95% for a confidence interval is a separate issue. A 95% confidence interval means that, if you took new samples from your population over and over, if you follow the procedure to calculate a 95% confidence interval, 95% of calculated confidence intervals will contain the true population value.