The Tenth Doctor acquired it from Matron Cofelia by pointing his own sonic at it and causing it to experience a power surge, emitting sparks and causing Cofelia to drop it in pain. It was also similar to Sarah Jane Smith's sonic lipstick in that it was disguised as a common item to avoid suspicion; since Cofelia took on the outward appearance of a smartly-dressed businesswoman, her sonic device resembled a sleek, black and silver fountain pen.
The sonic pen was able to open deadlock seals, but only ones it was coded to, while the Doctor's device remained ineffective against that precaution. When the Doctor put the ends of the functioning sonic pen and the sonic screwdriver near each other, they generated a feedback effect which stunned everyone in the vicinity. The pen was invaluable in stopping the Adipose' sinister plot as it allowed the Doctor to access the otherwise triple-deadlocked inducer. After the death of Cofelia, the Doctor threw the sonic pen into a bin. (TV: Partners in Crime)
The sonic pen had a number of abilities similar to other sonic devices, including an ability to cut metal cables, but also had a couple of features that appeared unique to it, namely activating or deactivating the Adipose inducer and overriding deadlock seals, provided it was coded to them. When repelled against the Doctor's sonic screwdriver, it could create a deafening sonic noise capable of stunning people and shattering glass. (TV: Partners in Crime)
Behind the scenes
A toy replica of the sonic pen was released by Character Options in a two-pack with the Doctor's sonic screwdriver. Both now featured a non-ultra violet-blue LED and identical sound effects. A single button built into the clip would activate the light and sound effects, and twisting the casing of the pen would extend the ink tip. Compared with the prop that appeared on-screen, the toy lacked the prop's extending feature, having being made only in its extended position.