The story
The gates of the lower world are held to stand open for the month, and the dead to come up — the ones with descendants to feed them and the ones without, who are the hungry ghosts the festival is named for.
The Buddhist telling is Mùlián, a disciple who found his mother reborn among them, her throat too narrow to swallow. The Buddha told him he could not free her alone but could with the whole assembly of monks, which is where the offering on this day comes from.
It is not a frightening festival so much as a careful one. What is being taken care of is the dead nobody else is taking care of.