English has two different prefixes that make a word into its opposite. OK, yes, there are more than two (dis-, a-, anti-, de-, etc.), but in- and un- are the most common. They bring the sense of “not” to an adjective, and they cause trouble because it is often not clear which one should be used for a particular word. Many pairs of in-/un- words are interchangeable. For example, “inalienable” and “unalienable” are both correct and mean the same thing (even the drafters of the Declaration of Independence went back and forth on that one), as do “inadvisable” and “unadvisable.” Still, the two prefixes are not equivalent.
As a pretty flimsy general rule, un- goes with Germanic roots and in- goes with Latin roots, as seen in these pairs: unfriendly, inamicable; unteachable; ineducable; unbelievable, incredible. Still, just because a word has a Latin root doesn’t mean it can’t go with un-: see unproductive, unfortunate, unreliable, undesirable, unconscious…and so on. Un- is also usually found with adjectives formed from participles ending in -ed or -ing: undomesticated, undeveloped, undisciplined, unconcerning, uncomprehending.
On the other hand, if a word has a Germanic root, it pretty much does mean it can’t go with in-. If you do find such a word, it is probably an example of a completely different prefix in-, meaning in or towards (incoming, infield, indwell). In- is much more restricted than un-. Un- is freely productive; it can apply to new words (“this haircut is brand new and unselfied!”), while in- remains frozen in the existing vocabulary, a Latin dinosaur bone.
Un- can even apply to words that already take in-, though when it does it often creates a different, less specific meaning. For example, while the word “indigestible” can be traced back to the meaning “not able to be digested” it carries extra layers of connotation –food that offends the senses or makes you feel bad, information that is too confusing to process– that “undigestible” doesn’t have. “Undigestible” is more straightforwardly “not able to be digested.” A poorly prepared lasagna is indigestible, but a rock is undigestible. Its meaning is composed of its two parts, while the meaning of “indigestible” comes from its long history of use.
But the search for these kinds of meaning difference can quickly turn messy and confusing. Once you start thinking about this too much, in- and un- words start to switch back and forth in your mind like a duck/rabbit optical illusion. Shades of difference in meaning emerge only to dissolve under closer scrutiny. Inaccessible, unaccessible? Inconsolable, unconsolable? Indescribable, undescribable? Surely they mean different things. No, maybe not. Many of these kinds of pairs have been switching back and forth for centuries. (At the current time, the in- forms of these particular words are considered more acceptable.) Some of them have gotten stuck on one setting or the other, and some will continue to be indecisive, or, if you will, undecided.