They are known as meteors, and I actually saw one last night!
It was part of the Perseids meteor shower that is visible from the UK annually. Here's a photo featuring British landmark Stonehenge:
The fleeting flashes of light were actually fragments from the trail left behind by Comet Swift-Tuttle that last passed our Earth in 1992, and isn't due back until 2125.
However, these pieces of space rock entered our atmosphere last night, and the speed at which they're travelling caused friction which heats up the air around it.
This is the reason we see a bright flash.
Sometimes gasses and molecules in the atmosphere remain hot for a longer time, which is why some shooting stars have a tail that lingers.