The earphone comprises a shell, a cavity is arranged on the shell, a sound generating structure is arranged in the cavity, the sound generating structure divides the cavity into a first sound cavity and a
second sound cavity, at least one of the shell and the sound generating structure is provided with a channel, the channel is communicated with the first sound cavity and the
second sound cavity, the shell is provided with a first sound outlet and a
second sound outlet, the first sound outlet is communicated with the first sound cavity, and the second sound outlet is communicated with the second sound cavity, a movable part is movable between a first position and a second position, when the movable part is located at the first position, the movable part blocks the channel, and when the movable part is located at the second position, the movable part avoids the channel, when the movable part avoids the channel, the first sound cavity and the second sound cavity are communicated, external sound can enter the first sound cavity through the second sound outlet and the channel, and a user can conveniently hear the external sound, when the movable part blocks the channel, the first sound cavity and the second sound cavity are isolated, external sound is isolated, and the user can conveniently obtain an immersive experience.