In general, spin affects the direction in which the ball will travel after hitting the ground.
Top spin and back spin requires you to unlock clubs with the ability to use spin.
With the right set of clubs, you'll be able to add top spin to your shot by tapping on the golf ball icon on the right when you're taking your shot.
This will bring up the ball spin mechanics where you can rotate the ball upward to add top spin.
Shots with top spin will further propel the ball forward after hitting the ground.