The transformation will be applied on each sample as shown in this line of code 262.
Each time the __getitem__ method of your Dataset is called, the sample will be transformed if self.transform was properly set.
The DataLoader created a batch of (transformed) samples by calling __getitem__ mutliple times (using multiple workers if specified).