Crowns is a currency that is essentially from real money. We get them from subscriptions or straight up buying them from Zos.
The crown store is accessed in game for using this currency to purchase anything from a DLC to mounts, costumes, hair styles and more.
There is another crown currency that only comes from crown crates which are essentially grab bags purchased with crowns and get random loot. Duplicate items end up becoming the secondary currency and consumables can be converts to it. This secondary gem can only be used to buy items that could have dropped in the crafts. I don't recall what they're called.
So the Crown Gems are attached to the Crown Crates, basically as a mechanism for what happens when you get a duplicate or junk in a Crown Crate.
In my 3 free Reapers Crown Crates, I got a Lynx pet, some tattoos, and a bunch of potions and poisons. The Potions and Poisons are useless to me since frafted in-game stuff is better, so I chose to Extract the crown gems from them. The number of gems extracted is pretty low, like 5pots=1 gem, 25 poisons=1gem, and so on. If I had gotten a duplicate Lynx, I could have extracted gems from that too. You should see the Extraction option in the Crown Crate menu.
These Crown Gems are used to buy items in the crown crates. When you look at the Crown Crate rewards in the Crown Store, you can see how many gems are needed to buy each item for gems. Generally, low priced costumes go for around 16 gems whereas the really rare stuff can go for 400 gems or so. For the first couple crown crate seasons, it was possibly to buy everything in the crates with gems if RNG was really not in your favor. That's also why there's been some controversy over ZOS adding ultra rare mounts to the crates that are not purchasable with crown gems.