I heard about these two words and want to know, are they the same or is there any difference or relation between them?
No, they are not synonymous terms. Sanatana means eternal. So any dharma which is eternal can be termed as sanatana. But Hindu dharma is a term that came into existence after the people of Indus vally civilazation, who practiced the Vedic system, were called as Hindus by followers of other religion. (See this answer)
If we see the history, then we will find that every major religion in the world had its founder or prophet. But the Vedic system has no such history of its inception. It is prehistoric and will continue to exist as long as there are humans. Hence, it is considered eternal and the Vedic religion is called as sanatana dharma.
However, because followers of the Abrahimic religion also consider their religion to be existing since the beginning, they can term their religion sanatana dharma as well technically, but Hindhu dharma will always denote the people of the Vedic religion. And sanatana dharma being a Vedic term, naturally implies the Vedic religion commonly known as Hinduism.
According to teachers, dharma, How things work and how people should behave is eternal, existing with Creation itself. All religions including Hinduism emerged out of this one dharma as described in Vedas. But Vedas do not prescribe any religion.