Basically, as prepositions, underneath and beneath mean the same thing: under or below.
• She didn’t wear anything underneath her long coat.
• We live underneath the same roof.
• Have you looked beneath the cooker?
As an adverb, underneath also means under.
• He was wearing a thin jacket with nothing underneath.
Beneath as an adverb means underneath or below.
• He looked out of the plane at the mountains beneath.
In the context of rank and position, underneath refers to people who are in a lower position in a hierarchy. So you could say “The employees of a company are underneath the chief executive officer”.
Beneath has a similar meaning, but carries the added meanings of being inferior or less important. It means unworthy or below the level of someone else. So, if you said to someone “You are beneath me”, that person would have the right to be quite insulted and slap you in the face! 😀