If f is a polynomial it means that f is continuous. Thus, if f(a) and f(b) have opposite signs then f must have a zero in the open interval (a,b).

If f(a) and f(b) have the same sign then it does not necessarily mean that f will not have a zero between a and b. For example take f(x)=x^2. Then f(-1)=1=f(1)>0 but 0 is between -1 and 1 and f(0)=0.