Mechanical waves like sound need a solid, liquid, or gas medium, whereas electromagnetic waves like light can travel through vacuum.