As Tamara mentioned, there are several prefixes that are used to add the concept of not to a word — in other words, to create a word with the opposite meaning. For example:
un-, im-, il-, ir-, in-
There is no “100%” rule about using these prefixes, but there is a little help with “half-rules” (so to speak). Some of these prefixes are used only with words that begin with a certain letter.
im- This is only used with words (but not all of them) that begin with M or P:
immeasurable, impolite, impossible BUT unmasked, unperturbed
il- This is only used with words (but not all of them) that begin with L:
illegal, illegible, illogical BUT unloaded
ir- This is only used with words (but not all of them) that begin with R
irreplaceable, irrelevant BUT unreasonable
The prefix in- has no “half-rule” whatsoever as far as I know, but it is often used with words beginning with a vowel:
inadmissable, inedible, inexplicable, inoperable
And, of course, there is also the prefix dis-: dissastisfied
There are only “half-rules” that you can use as a very general guideline for these prefixes. Unfortunately, there are no 100% rules.