The Quarry is provided for free by opening up the first Land Expansion. You get a 2nd Quarry when you open the L15 Land Expansion as well.
The Quarry provides Rocks, Clay and Experience points.
You should always cast a Spell on your Quarry! This will give you 2 Clay instead of 1. Clay is used to make Bricks, also for quest objectives and building construction