What is the difference between a buzzer and a speaker and are there any other basic electric/electronic things that output sound?
A buzzer usually has an oscillating transistor circuit inside - to make the buzzing noise when voltage is applied, so it makes a tone.
Applying voltage to a speaker will not make a tone, so you'd need an external oscillating circuit (e.g. a 555, or transistor oscillator). A speaker can play all kinds of sounds, however due to its built in circuits, a buzzer may not be capable of playing tones other than its oscillator's tone.
Buzzers are usually piezo buzzers - based on a tiny bit of crystal inside. You can usually see a metallic flat surface there, with a larger box/circuit underneath for the built in oscillator circuit.
When someone is "buzzed" into the house, its with a relay (electro-mechanical) sound-maker.
A relay, wired as normally closed, but able to break the circuit, is a buzzer.
simulate this circuit – Schematic created using CircuitLab
Traditionally a buzzer was a device designed to make noise. Traditionally it would have been an electromechanical device. It would typically be supplied with DC and the oscillations would have been produced by an electromechanical process inside the buzzer.
A speaker was/is a device used to reproduce sound from an electric waveform with the sound coming out being at least a passable analogue of the signal going in.
However in more recent years the world has moved on. The relative cost of electronics in general and micro controllers in particular has dropped compared to the cost of electromechanics.
So nowadays instead of a traditional mechanical buzzer we often use "piezo sounders". These are something of a half-way house between the traditional buzzers and speakers. They are driven with an audio-frequency waveform, typically a square wave. That allows multiple tones for different types of alert and even allows playing crude music. However they are not designed to reproduce arbitrary audio with anything like reasonable accuracy.
Whether to class piezo sounders as "buzzers", "speakers" or neither is somewhat a matter of semantics.
I suspect the "mistake" is actually a case of your instructor disagreeing with whoever wrote the course material rather than a real mistake but without more detail it is hard to be sure.