What have you said? and What did you say?

I am confused between these sentences.
what is the difference between
What have you said? and What did you say? & understand and understood
How do I use them.

“What did you say?” (simple past) asks about a specific past occasion.
“What have you said?” (present perfect) is less focused on a specific past occasion, and more interested in the fact that something has been said at all (at any time), with the implication that this may have an effect on the present situation.

For more information about the difference between simple past and present perfect, see:
englishpage.com/verbpage/presentperfect.html
englishpage.com/verbpage/simplepast.html

“understood” is the past tense and past participle of the verb “understand”.