Masking is based on masking properties of the human ear. In contrast: When you look at the sun and if a bird passes ahead, you do not see it because of the too predominant light of the sun. In audio, it is similar. In the presence of strong sounds, you do not hear the weakest ones. Take for example traffic on a highway. During rush hour construction drilling may limit your ability to a hear an ambulance behind you; henceforth the ambulance is masked or vice versa . Different types of psychoacoustic masking exist and are exploited in most coding systems.
Simultaneous masking is a frequency domain phenomenon, where a low-level signal (noise) commonly referred to as the maskee can be made inaudible by the presence of a stronger signal masker, (i.e high amplitude pure tone masking a noise). Several of the masking properties listed above are deployed in most coding systems (psychoacoustic models, etc). The masking threshold for each varies depending upon a number of characteristics, which are limited to the SPL and frequency of the masker. In practice high frequency noises are more easily masked.
Temporal masking is a time domain phenomena by which masking can be exploited before and after a signal, hence pre-masking and post-masking. The onset of pre-masking is relatively short and doesn't last upwards of 20 msec. In contrast to that of post-masking, which can last upwards of 50-200 msec after the signal that is being masked, usually the Simultaneous masker.