Extrinsic motivation occurs when a person is motivated to do a certain behavior to gain a reward or to avoid getting punished. Intrinsic motivation, on the other hand, is when a person is motivated to do something just because he or she finds joy doing it. An example is, kid A studies hard for the exam because he wants to be in the top 3 in their class.
While kid B shows intrinsic motivation by studying hard for the exam because he finds studying fascinating. Another example of extrinsic motivation is child A cleans her room neat and orderly because she does not want her parents to reprimand her living in a pigsty while child B cleans his room regularly because he enjoys tidying up and arranging his stuff.