To get rid of worms in your dogs intestines you'll need to give your dog some worm medicine.
You can buy over the counter worm medicine for your dog online without prescription or you can get a stronger worm medication through your vet with a prescription.
Giving your dog worm medicine is the only way to cure your dog of worms whether you take the dog to the Vet or give them over the counter worm medication.