Goodness takes many forms. Basically, it can be spiritual or earthly, and these two types of goodness come together in what is genuinely good on the moral level. The same goes for types of truth as for types of goodness, because truths come from what is good and are forms of what is good.
The relationship between what is evil and what is false is the inverse of the relationship between what is good and what is true. That is, just as everything in the universe that is in accord with the divine design goes back to what is good and what is true, so everything that violates that design goes back to what is evil and what is false. Further, just as what is good loves being joined to what is true and what is true loves being joined to what is good, likewise what is evil loves being joined to what is false and what is false loves being joined to what is evil.
And just as all intelligence and wisdom are born of a bond between what is good and what is true, so all madness and stupidity are born of a bond between what is evil and what is false. The bond between evil and falsity is called “the hellish marriage.”
We can see from the fact that evil and falsity are the opposite of goodness and truth that nothing true can be joined to anything evil and nothing good can be joined to any falsity arising from evil. If anything true is put together with something evil it is no longer true; it is false because it has been distorted. If anything good is put together with some falsity arising from evil it is no longer good; it is evil because it has been polluted. A falsity that does not arise from evil, though, can be joined to goodness.
“No one who is resolutely and habitually devoted to what is evil and what is false can know what is good and what is true, because such people believe that their evil is good and that their falsity is the truth. On the other hand, anyone who is resolutely and habitually devoted to what is good and what is true can know what is evil and what is false. This is because every type of goodness and its accompanying truth is heavenly in essence, and if any of it is not heavenly in essence it still comes from heaven. Every type of evil and its accompanying falsity, though, is hellish in essence, and any of it that is not hellish in essence still comes from hell. Everything heavenly is in the light, while everything hellish is in darkness.
from New Jerusalem, Sections 16-19