As killing foxes is somewhat controversial, prevention is the best way to control them. Secure fencing around your garden is the most effective.
As foxes notoriously rummage through bins for food, keeping your rubbish secure and inaccessible will discourage foxes from prowling your garden.