Yes, you are right that gives you a tensor of torch.Size([4, 256, 256]).
The intuition here is that you want to normalize image before feeding it to the network. The normalization usually comprises 2 operations: make the input distribution a 0-mean and 1-std. In this piece of code you are normalizing per channel as each channel (or each RGB color) distribution might have different characteristics so you want to normalize per channels. This assumes there is a correlation between channels of the same color, which might makes sense.
However in practice I found that you can also normalize the whole batch of images aggregating all the channels without any issue:
# torch.Size([4, 3, 256, 256]) 
print(batch.shape)

# Norm
batch_mean = batch.mean()
batch_std = batch.std()
batch = (batch - batch_mean) / batch_std

You can also take a look at albumentaitons library specifically to albumentations.transforms.Normalization which does the same automatically for you