There are two prefixes spelled in-. Both come from Latin, but they are not related to each other. The basic meaning of one prefix is not. Thus inactive means not active. This in- is related to and sometimes confused with the prefix un- that means not (unfortunately, there are also two un-s). In fact, sometimes in- is used interchangeably with un-, as when incommunicative is used instead of uncommunicative. Before the consonants l and r, in- becomes il- and ir- respectively: illogical, irregular. Before the consonants b, m, and p, in- becomes im-: imbalanced, immeasurable, impossible.
1
The second in- has for its basic meaning in, within, or into. For example, inlay means to set something in something else. In- is also a form of the prefix en-. And in pairs such as enclose/inclose, enquire/inquire, ensure/insure, the two prefixes can be used somewhat interchangeably. As with the other prefix in-, before the consonants l and r, in- becomes il- and ir-: illuminate, irrigate. Before the consonants b, m, and p, in- becomes im-: imbibe, immigrate, implant.