Not all lenses have hoods, and some don't recommend them.
For example, the Pentax 10-17mm fisheye doesn't recommend using them. You'd actually see the hood in the picture.
The main purpose of a lens hood is to block some of the light rays, so you don't have any lens flair.
Where the reflection of the light is visible in the picture.
You can see it quite visibly at the top, just right of the center in this photo.
and follow the trail down
I've bought collapsible rubber hoods for most of my lenses which didn't come with them.
They use the filter threads to stay on.