Hi. I am learning to use unity and that purple line appears from the trail renderer when I press start. Does anybody know what causes it and how to fix it?

Several things to fix this:

  1. You need to assign a sprite. In the Inspector for the Trail Renderer Component, find Materials and in Element0, select “Sprites-Default”
  2. Reduce the Time. 0.3 gives a nice short trail
  3. Adjust the curve to change the shape of the trail
  4. Change the colour - you can have a start and an end colour, if you wish

You might like to find a good video tutorial - there are plenty out there. Also, check the manual