So the proof involves bisection of the intervals. We start with interval [a,b], where f(a)>0 and f(b)<0. Now we bisect the inteval and consider f((a+b)/2). If the function value at the midpoint is +ve then we select the interval [(a+b/2),b], else the interval [a,(a+b)/2]. So in this way we get a subinterval of [a,b], and the length is half of the previous one. Call this new subinterval [a_{1},b_{1}]We continue the bisection on the interval in the above manner. So we get a sequence of nested subintervals.
[a,b]\supset[a_{1},b_{1}]\supset[a_{2},b_{2}]....
We get two sequences a_{n} and b_{n}. Now both sequence converge to the same point say "x". Then we assert that f(x)=0. If not zero, then there exist a neighborhood of x, where it is not zero, say (x-\epsilon, x+\epsilon) and function values are entirely +ve or -ve in the interval. But given this epslion i can choose a interval from the sequence of intervals which lies completely in (x-\epsilon, x+\epsilon). But then the endpoints have +ve and -ve value, which is a contradiction.
Hence f(x)=0. Proved.