Now that that’s out of the way, the other three are very similar but of different ranks. Emperor is as high as you can get as a monarch, and usually but not always is a collection of nations ruled by one nation, which is not to be confused with one person being a king of multiple nations. An emperor might have kings under his command. A kingdom is lesser than that, with a king as the leader and generally has dukes under the king’s rule. One person can be king of multiple kingdoms without being an emperor though because the kingdoms are still technically independent and only linked by their king. A duchy is less than a kingdom, and usually not an independent state. Most duchies are parts of larger kingdoms with dukes listening to kings.
That being said, there is a lot of overlap between the three which makes it complicated, and the differences are mostly in the name.