Your competent cells should contain a fragment of the enzyme that desintegrates x-gal (LacZΔM15). The other fragment of the enzyme is defect. An intact version of that defect part is encoded by your vector. The sequence is destroyed by insertion in the multiple cloning site. Therefor, if you have no insert, you will have one part of your enzyme encoded in the genome of your cells, the other part encoded by the vector -> Enzyme is funcional -> x-gal is desintegrated into a blue color. If you have an insert, you have only the one part from the genome, both copies of the other part in the genome and the vector are not funtional -> no desintegration of x-gal -> white colonies.