Recently I've finally begun shifting my focus from D7 to D8, and I'm converting a site over to D8. In D7, I type-hinted my account objects as \stdClass, since they were not members of any class. However in D8, they are now members of the User class.

That said, I'm finding in some code on the net that people are typehinting as Drupal\Core\Session\AccountInterface, and in other places as Drupal\user\UserInterface. How should we be determining which one to use for our typehints, and what is the difference between the two types of objects?