They merge and carry on all the traits - so any combination will create a merged gem. So for example, mana leech gem will hit one creep, but if you combine it with a slow, when it hits you get mana and the creep is slowed. Then combine that with a chain-hit and now you can hit more than one creep at a time, getting mana from both of them along with slowing both of them. You sacrifice a bit of power with each different gem type, so don’t go crazy.
The important thing is to look at the types of creeps and build towers to counter them. Some have a lot of armor? Use Armor tearing up front to whittle down the armor, Better yet, combine mana-leech with armor tearing and you whittle armor + get mana. It’s always good to have mana leech up front because you want to leech from everything you can to build up your mana pool - as this is the currency to build new towers & create new gems.
My biggest suggestion is to get used to the hot-keys. D = duplicate, G = combine. So for example, if you have a gem in a tower, just mouse over it, hit D and the duplicate will show up in your inventory. Then hit G and click on the tower and it will merge the two gems. This saves a tremendous amount of clicking & dragging.
The biggest problem with gemcraft is that all the guides show all this stuff that you can’t build because you haven’t cleared the fields to get the towers & gems and they reference “once you’re wizard level 1,000 or above”.
Don’t get confused when you are given many gems on one field that you don’t get on other fields. Once you find that gem, it will show up on all future maps - your starting loadout will increase.
Just have fun. It’s actually quite challenging to figure out the combinations / pathing to your best benefit.