Every sentence has two possible ways to present the same action, depending on what the speaker wants to focus on: the doer of the action, or the receiver of the action.
Active voice puts the doer first, as the subject: The chef cooked the meal.
Passive voice puts the receiver first, as the subject, and shifts the doer to the background — or removes it entirely: The meal was cooked (by the chef)