There are Soul Trap spells you can buy from vendors. Cast the spell on an enemy and kill them while it is still active, and their soul is captured—but you need a soul gem in your inventory to hold it. If you would rather not bother with the spells, there are also Soul Trap staves that do the job for you.