By passing the stone
If the stone is 5 mm, you might have a 50 percent chance of passing it spontaneously, with the percentage chance higher or lower depending on stone size.
Prevention is the best way to avoid this! more fluids, less sodium and animal protein
are good ways to reduce risk, with other possible methods depending on your situation.