Striving towards the goal for personal satisfaction and happiness is called intrinsic motivation. Whereas extrinsic motivation happens to achieve for something or to get rid of punishment.
Extrinsic motivation always comes from outside that is based on the things that we get from outside. Whereas intrinsic motivation is similar to self-motivation where it comes from within.
Both type of motivation enable us to be successful and to achieve our goals. It pushes our mind towards the target / achievement and show the path towards the success.