When the contents of a window are too large to be displayed entirely within the window, a scroll bar will appear. For example, if a Web page is too long to fit within a window, a scroll bar will show up on the right-hand side of the window, allowing you to scroll up and down the page. If the page is too wide for the window, another scroll bar will appear at the bottom of the window, allowing you to scroll to the left and right. If the window's contents fit within the current window size, the scroll bars will not appear.
The scroll bar contains a slider that the user can click and drag to scroll through the window. As you may have noticed, the size of the slider may change for different windows. This is because the slider's size represents what percentage of the window's content is currently being displayed within the window. For example, a slider that takes up 75% of the scroll bar means 75% of the content fits within the current window size. A slider that fills only 10% of the scroll bar means only 10% of the window's contents are being displayed within the current window size. Therefore, if two windows are the same size, the one with the smaller slider has more content than the one with the larger slider.
Most scroll bars also contain up and down or left and right arrows that allow the user to scroll in small increments by clicking the arrows. However, clicking and dragging the slider is much faster, so the arrow keys are typically not used as often. Also, some mice have a scroll wheel that allows the user to scroll by dragging the wheel instead of clicking and dragging within the scroll bar.