Your lens hood’s main purpose is to block light from hitting lens. If your lens is a prime lens (fixed focal length, non-zooming) the hood will resemble a tube, often larger at one end than the other. For zoom lenses the hood will have a curved opening at one end.
This curve is cut to the zoom range of the lens and allows for the wider field of view afforded smaller focal lengths, while still attempting to block most light at a longer focal length. It’s a compromise that matches the compromise of a zoom lens.
A lens hood can also offer a convenience for you. When putting away a camera with lens attached in a toploader-style case or a backpack. To allow a faster shot, I often leave the hood installed (not reversed) and leave the lens cap off – allowing the hood to protect the front lens element.