They could be used to read minds, control them, and add information into them (news or a daily joke, for example). They were also the alternate universe's alternative to iPods, mobile phones and music players.
Secretly, however, EarPods could remove information from a subject's brain by producing two metal prongs that met at the top of the head. (TV: Rise of the Cybermen) The EarPods were also able to control people by inducing a trance. After the trance was induced they could be controlled by a handheld device, and given orders, such as turning left. Prior to the "upgrading" of humans into Cybermen, the EarPods would place people into a trance, and then force them to willingly walk into a conversion booth. (TV: The Age of Steel) On the Doctor's Earth, the Cybermen used earpieces, specifically to control people. Instead of wearing them, they were drilled straight into the victim's brain. (TV: Army of Ghosts)
When the Cybermen entered the Doctor's universe, the earpieces of the Torchwood Institute, specifically worn by at least three known members of Torchwood 1 (Adeola Oshodi, Gareth Evans, and Matt Crane) allowed control in a fashion similar to EarPods, paving the way for the Battle of Canary Wharf. The Doctor realized what was happening, and, with his sonic screwdriver, disrupted the signal, but at a great cost: all three of them screamed in agony and died. (TV: Army of Ghosts)
During their attempted conquest of the Doctor's version of Earth in 1851, the Cybermen made cruder versions of the EarPods to control four workhouse owners. When the workhouse owners were no longer of use to the Cybermen, Miss Hartigan activated a switch which caused their EarPods to electrocute and kill them. (TV: The Next Doctor)
Behind the scenes
The name EarPod fairly obviously takes its inspirations from iPod, an electronic device developed by Apple. In 2012 Apple introduced a new model of earphones named EarPod, and a wireless model – AirPods – in 2016.