The following two images demonstrate this. The first uses an aperture of f2.8 which is a very wide aperture meaning the hole that light can pass through is large. This gives a narrow depth of field with only a small area of the image in focus.
The next image shows the other extreme, a very small aperture, f22. This has much more of the image in focus, but requires a longer shutter speed.