A convex lens bends every ray leaving a point on your subject so they all meet again at a single point behind the lens. Put the sensor exactly where they meet and the image is razor-sharp; put it slightly off and each point smears into a little disc β the circle of confusion β and the photo looks blurry. The aperture controls how steeply those rays converge, which sets how much of the scene is in focus at once. Scroll through to see the real geometry at work.
Rays leave a point on the object, refract through the convex lens, and converge to an image point a distance di behind it, set by the thin-lens equation 1/f = 1/do + 1/di. The sensor only sees a sharp image where those rays actually cross. Slide Focus to move the sensor: land it on the crossing point for a crisp image, or off it to watch each point bloom into a circle of confusion.
The aperture is the hole light passes through; its diameter is f / N for focal length f and f-number N. A wide aperture (small N like f/1.8) makes a steep cone of light, so anything not at the focus distance smears fast β a shallow depth of field. A narrow aperture (large N like f/16) makes a slim cone, so near and far both stay sharp β a deep field. The catch: narrowing the aperture also starves the sensor of light.