A computer is a device that can be used to generate or receive information, while a speaker is an output hardware device that connects to a computer to generate sound.