Although most lenses come with lens hoods it's amazing to see how few amateur photographers actually use their lens hood. Many think that lens hoods are useless and only take up more space in camera bags. The fact is that a lens hood should live on your lens. The purpose of a lens hood is to create a shadow on the lens to prevent lens flare from stray light, mostly caused by the sun. However, the hood should also be used at night due to street lights or other point source lights. Often photographers avoid using their lens hoods on cloudy days, but these are the types of conditions where it is especially important to have a hood because it is difficult to detect the problem until you see it downloaded on your computer.
Problems like this one are easy to see for most, but look at the two images below.
The only difference in these two images is the use of a hood. You can see that in one instance the image lacks contrast and blacks are missing from the image while the other is crisp and has very good contrast.
There is only one instance you would not want to use a hood - when you are shooting with a built in flash at a wide angle. The hood would obstruct the flash, leaving a dark shadow on the bottom of frame.
If your lens didn't come with a hood, don't worry, you still have have two options. The first is to buy one. But make sure that it was meant for your specific lens. Hoods are designed specifically for the focal length of a lens. Your second option is to use your hand. Just put your hand in front of the lens until the flare disappears. But this means that you have to have recognized it. Which brings us back to your first option. Just buy one.