Well, from a hypothesis. Not a theory, really, because it didn't really have a body of evidence supporting it.
Also worth pointing out, to anyone who might wonder if the ideas behind homeopathy might actually make sense -- that this was pre-germ-theory. I.e., he didn't know microorganisms existed, or that they might have something to do with illness.