We analyse the X-ray spectrum of the active late-type star YZ CMi (M4.5V); for quiescent as well as active stages, we derive emission measure (EM) distributions, elemental abundances, and electron temperatures and densities, which are in turn used to estimate flare loop lengths as well as coronal magnetic field strengths. YZ CMi was observed in the wavelength range 1-40 Å by the X-ray detectors RGS, EPIC-MOS and EPIC-pn onboard XMM-Newton. Some flares occurred during the observation. We perform a multi-temperature fit and model the differential EM of both the flaring and the quiescent parts of the spectrum and derive the coronal temperature distribution, EMs, and elemental abundances of the flaring and quiescent states. The observed temperature covers a range from about 1.3 to 42 MK. The total volume EM in this temperature interval is 13.7 ± .8 × 1050 cm−3 for the quiescent state and 21.7 ± 1.4 × 1050 cm−3 for the active state. The abundance pattern in the quiescent state shows some depletion of low first ionization potential (FIP) elements relative to high-FIP elements, indicating the presence of an I(nverse)FIP effect in this active star. No abundance differences between the quiescent and the active states are established. Based on the X-ray light curves in combination with the temperature, density and EM, the coronal magnetic field strength at flare-site is found to be between 50 and 100 G and the flaring loop lengths are estimated to be in the range of 5 -13 × 109 c