You can send us photos of the mushroom so we can see what you may be dealing with.
You may be referring to a type of puffball. Like other mushrooms it is living on dead organic matter in the soil. They eventually crack open. Often there is a dead tree root decomposing under the soil which is providing the nourishment it needs. It is not harmful nor is there anything you can spray or apply to get rid of it.