Probably the best thing for you to do is find a story or novel and look through the pages until you see a page that has two of the characters talking with each other. The lines will be shorter than others and there will be spaces between the speech of one and that of another. All these lines of dialogue are placed in quotation marks, of course. Each time a different person speaks, another line is written below the words of the previous speaker. Here is an example of dialogue between two characters in John Steinbeck's novel, The Pearl:
"It is a pearl of great value," Kino said.
The dealer's fingers spurned the pearl so that it bounced and rebounded softly from the side of the velvet tray.
"You have heard of fool's gold," the dealer said. "This pearl is like fool's gold. It is too large. Who would buy it? There is no market for such things. It is a curiosity only. I am sorry. You thought it was a thing of value, and it is only a curiosity."
Now Kino's face was perplexed and worried. "It is the Pearl of the World," he cried. "No one has ever seen such a pearl."
The words in the bold print are the speakers' words. And, the other words are explanations of how the speaker said these words [he cried] or what else occurs while the speaker talks, such as an explanation of what the dealer does while he speaks or of Kino's emotions. [Now Kino's face was perplexed and worried.]
So, there are two things going on when one writes dialogue: 1. There is the exchange of words from the speakers which are place inside quotation marks. ["---"]. 2. There are explanatory phrases that indicate the thoughts or actions of the speakers.
Now, in the above explanation both speakers discuss the pearl; therefore, the words of the speakers are placed in third person (the pearl, it is....) If, however, the speakers talk directly to each other, the dialogue must be in first and second person--in either order. For example,
"I really wish you would consider staying overnight as the weather is so inclement," said Bill. [second person--talking to someone]
"Now, don't worry. I only have a few miles to go before I am home, and I've made this trip many, many times." objected Tom. [first person--answering]
Just picture yourself talking with someone and you have the concept of dialogue/conversing.