The passive voice is used in English when the subject is unknown or unimportant. We form it by using the verb to be (in the appropriate tense) plus the past participle. For example.
The president was interviewed. (We don't know who interviewed the president.)
The child will be punished. (We don't know who will punish the child.)
The door has been closed. (We don't know who or what closed the door.)
Sometimes, we do know but don't care, or it's not important. For example:
The president was interviewed by the journalist
The child will be punished by his parents.
The door was closed by the guard.
When we do care, or when the subject (the doer) is important we use the active voice:
The journalist interviewed the president.
The child's parents will punish him.
The guard opened the door.