When we put an object of an active sentence into passive, it becomes subject of the passive sentence.
The professor gave the students the books.
The professor gave the books to the students.
The students were given the books.
The books were given to the students.
We sometimes use a pronoun for "the students" or "the books" in its subject form (here: they).
They were given the books.
They were given to the students.
We very often leave out the by-agent in the passive sentence (here: by the professor).
The phrase It is said ... is an impersonal passive construction. We often use it in news.
Passive sentence - version 1:
It is said that children are afraid of ghosts.
Passive sentence - version 2:
Children are said to be afraid of ghosts.
The correct active sentence would be:
Active sentence: People say that children are afraid of ghosts.