You can either cast the spell yourself, or enchant a weapon with the Soul Trap enchant.
In order to fill a soul gem, you need to use a form of the Soul Trap spell. In The Elder Scrolls V: Skyrim for the PC, PS3, and Xbox 360, Black soul gems are needed in order to trap the souls of humanoids that can’t go into regular soul gems.