The HeI infrared (IR) triplet at 10830{AA} is an important activity indicator for the Sun and in solar-type stars, however, it has rarely been studied in relation to M dwarfs to date. In this study, we use the time-averaged spectra of 319 single stars with spectral types ranging from M0.0 V to M9.0V obtained with the CARMENES high resolution optical and near-infrared spectrograph at Calar Alto to study the properties of the HeI IR triplet lines. In quiescence, we find the triplet in absorption with a decrease of the measured pseudo equivalent width (pEW) towards later sub-types. For stars later than M5.0 V, the HeI triplet becomes undetectable in our study. This dependence on effective temperature may be related to a change in chromospheric conditions along the Mdwarf sequence. When an emission in the triplet is observed, we attribute it to flaring. The absence of emission during quiescence is consistent with line formation by photo-ionisation and recombination, while flare emission may be caused by collisions within dense material. The HeI triplet tends to increase in depth according to increasing activity levels, ultimately becoming filled in; however, we do not find a correlation between the pEW(He IR) and X-ray properties. This behaviour may be attributed to the absence of very inactive stars (LX/Lbol<-5.5) in our sample or to the complex behaviour with regard to increasing depth and filling in.