And David built there an altar unto the LORD, and offered burnt offerings and peace offerings. So the LORD was intreated for the land, and the plague was stayed from Israel.
David constructed an altar for God at that location and sacrificed burnt and peace offerings. This caused God to respond favorably to the land, stopping the plague from harming Israel.