when constructing a cloning vector(plasmid) we incorporate a multiple cloning site in it, in case of pUC19 it's inserted after the first few codons of the lacZ gene. how is it possible without inactivating the gene? is it inserted in an intron?

Likely the polylinker adds a number of bases evenly divisible by three, so it does not frameshift the sequence downstream. You end up with a few extra amino acids added in just after the start of translation. When you clone into the polylinker, you may or may not have a frameshifting number of bases and likely you will produce many more amino acids (assuming you don't clone in an in-frame stop codon).