The peaks and valleys in the graph are called extrema. The maximum number of these is limited by the degree of the polynomial --- the largest exponent in the polynomial. There may be no extrema, but the maximum number is one less than the degree of the polynomial. Approximately half of these will be peaks --- the rest will be valleys. There is a function that can be derived from the polynomial that allows you to find the extrema and, after you know where an extrema is, it is easy to determine if it is a peak or valley.
The derivative of a function is another function that describes how the function changes. Finding the derivative is fairly easy --- delete the constant term and change each remaining term by the formula: aX^n goes to anX^(n - 1). For example, the derivative of X^4 + 2X^3 - 3X^2 + 4X - 5 is 4X^3 + 6X^2 - 6X + 4. At any point (X,Y) on the polynomial X^4 + 2X^3 - 3X^2 + 4X - 5, the derivative gives the slope of the tangent line of the curve that goes through (X,Y). The derivative of a polynomial describes how the slope of the polynomial changes at each point.
At the peak of the graph of a polynomial, the slope changes from positive to negative --- the curve was going up and then it starts going down. At the exact point of extrema, the derivative is zero. The roots of the derivative of a polynomial give the extrema of the polynomial. For example, the polynomial 2X^3 - 9X^2 + 12 X - 2 has the derivative X^2 - 3X + 2. The roots of the derivative are 1 and 2 because X^2 - 3X + 2 = (X - 1)(X - 2). If you put the points X = 1 and X - 2 in the polynomial, you see that the extrema are (1,3) and (2,2), so (1,3) is a peak and (2,2) is a valley.
Multiple roots can seriously reduce the number of extrema in a graph. For example, X^3 + 3X^2 + 3X + 1 is a degree three polynomial, so you might expect two extrema: one peak and one valley. This polynomial actually has no extrema, because the polynomial has multiple roots: X^3 + 3X^2 + 3X + 1 = (X + 1)^3. The derivative is 3X^2 + 6X + 3 = 3(X + 1)^2. This would seem to indicate that X = -1 is an extrema, but it is not. Multiple roots change the rules.