Masjid is the arabic word, and therefore is the more correct term. Mosque is the anglicized version.
Some people think that Mosque is derived from the spanish word for mosquitos (because the spanish wished to stamp out the Muslims Masajid like little Mosquitos) but linguists say this is an urban myth. The Oxford American Dictionary states under the entry "mosque":
ORIGIN late Middle English : from French mosquée, via Italian and Spanish from Egyptian Arabic masgid.
And Allah knows best.
English etymology makes it clear that mosque came into English in the 17th century from Italian moschea and French mosquee. The resemblance with mosquito is accidental. Mosquito came from Spanish as a derivative of mosca (fly). (SOURCE