Taxonomy terms can be created with levels of hierarchy. However, I have never, in D7 or D8, been able to find a simple way to get that data out of them on the back end.
When I use
\Drupal\taxonomy\Entity\Term::load(), there's no data in the returned object about its hierarchical level, nor of its parents or children. I can't seem to locate any class methods that would get me that information.