Context. The first million years of the pre-main-sequence (PMS) evolution of low-mass stars are characterized by magnetospheric accretion, a circumstellar proto-planetary disk, and the processes leading to its dispersal. Among these, photo-evaporation caused by strong X-ray emission from the central star is probably significant. Several aspects of the X-ray emission from coronae and accretion shocks remain mysterious, e.g., whether and how much accretion affects coronal emission. Aims. We studied the X-ray variability of ∼1 Myr old low-mass PMS stars as a function of timescale, stellar rotation, and stellar characteristics to gain insights into the working of PMS coronae, their X-ray emission, and the circumstellar environment in which they are immersed. Methods. We have exploited the ∼850 ks long Chandra observation of the Orion Nebula Cluster obtained by the COUP collaboration in January 2003, and statistically analyzed the X-ray lightcurves of low-mass stars in several subsamples. Our main focus was to characterize the different X-ray behavior of stars with and without circumstellar accretion disks, and to infer the physical mechanism responsible for the observed variability. Results. Accreting stars (classical T Tauri stars, CTTSs) are found to be more variable than non-accreting stars (weak-line T Tauri stars, WTTSs) at all timescales and in all X-ray energy bands considered. Variability is seen to increase with timescale, up to the longest probed, ∼10 days. Signatures of rotational modulation are observed for both CTTSs and WTTSs, and most clearly for CTTSs in the soft X-ray band. Lower mass stars are more variable than higher mass stars. Conclusions. We propose that the difference in variability between CTTSs and WTTSs may be explained assuming that the X-ray emission of CTTS is affected by time-variable absorption due to circumstellar structures, such as warps in the inner disk and/or accretion streams. This suggestion is appealing because, in the hypothesis that the coronae of CTTSs and WTTSs are similar, it may also explain why CTTSs have lower and more scattered X-ray emission levels compared to WTTSs.