I would recommend to check out the tutorials first and in particular this transfer learning tutorial.
This should explain a lot about the underlying Dataset and DataLoader usage as well as about the general training structure.