On which version?
On the v5 or Famitama, I think your Tamagotchi needs to be a child to begin training. It will generally beep for training at 10am, 12pm, 2pm, 4pm and 6pm.
On the v1, your Tamagotchi's first attention call will be 45 minutes into the baby stage. This is the first time you can train it.
On the v2-v4.5, I think you can train your Tamagotchi right from the start, if you wrap a gift, connect with another Tamagotchi of the SAME version and hope that your Tamagotchi sends the wrong gift (if it does, it'll sit at the bottom of the screen looking guilty, this is your chance to give a time out). However I don't know for certain.