Moth balls do work to get rid of moles in your yard and what you need to do is put the mothballs down the holes where the moles are.
Another good way to get rid of moles in your yard is to set a mole trap positioned into the moles active tunnel.
You can also soak cotton balls in Eucalyptus Or Mint Oil and place the cotton balls down the moles holes which will deter the moles in your yard.
Another option is to call in a professional mole trapper or exterminator to fully rid the moles in your yard.