Basics of Soul Gems:
Soul Gems come in a variety of sizes (Petty, Common, Grand) and the correspond to the 'size' of the soul you are going to capture (petty, common, grand, etc.)
Some soul gems that you find and buy come pre-filled with souls.
Empty soul gems you will have to fill. In the conjuration school of magic (I think it's conjuration), there's a spell you can cast called "soul trap". If you cast the spell and kill the creature before the spell wears out, the creature's soul will then fill an empty soul gem in your inventory.
The bigger & badder the creature, the bigger and badder the soul to be captured.
The soul to be captured can only inhabit a soul gem that is equal or greater than it's size. So, a grand soul can only go into a grand soul gem, but a petty soul can go into any sized soul gem.
filled soul gems can be used to recharge enchanted items or to forge new enchantments onto items.