Gravity anomalies are simply departures from the predictions of gravitational acceleration produced by a simple model. As for how to produce one: Simple. Dig a very, very big hole and fill it with iron. Or dig a very, very big hole and fill it with salt. Either way, voila! You have a gravitational anomaly. A simple model of Earth's gravity would not contain knowledge of this volume that contains material that is more dense (iron) or less dense (salt) than the surrounding rock.