Formal treatments of calculus are based around infinitesimals. Infinitesimals are the same set of ideas about infinite sets, but applied to the spaces between arbitrarily close points.
Specifically formal treatments of calculus work because between any two points there are an infinite number of points and the size of that infinity is the same size as the entire set of real numbers.
At least this is my undergrad level of comprehension. I'm certain there are more exotic treatments, but this is the one that you have to do all the proofs for.