The Emerald is a rare vanilla jewel (one of two vanilla jewels, the other being Diamond) that is gotten from mining Emerald Ore in the Extreme Hills biome. The only thing truly rare about it is the biome that it is found in; it is actually more common than diamond in a world.
Emeralds can be traded with testificates (villagers) for various items, depending on the testificate. They can also be obtained from testificates by trading items to them. They can effectively be farmed by use the Auto-Spawner to spawn exact copies of a testificate with favourable trades, or spawning many different testificates, at a lower cost per testificate, in hope that favourable ones will spawn.