Correct... is an ambiguous term. So I'll show some simple and concise guidelines to make sure your reader knows who's speaking.
"What are you even talkin' 'bout?"
He sighs, shaking his head in disgust.
"Hey! I'm talkin' ta you!"
So in this setup, with each new paragraph, you have a dialogue 'chance'. If there's no dialogue, that person didn't speak. What's more important to note here, is the difference in character voice, though. Even with this little actual dialogue, you should be able to tell them apart.
What my suggestion is, is for you to:
1) Give each character a unique voice. Whether by means of slang, or unique word choice, or unique focus.
2) Never let more than one character speak within a single paragraph. In fact, some might even argue that each paragraph should have only one character's actions.
"Hey! I'm talkin' ta you!" The boy balled his fists tight.
So, if you follow this guideline, your reader will automatically know, just by the action, that 'the boy' said it, simply because his action follows. Dialogue tags are less needed in this format, but it isn't a universal rule (not yet).
I would recommend keeping the amount of people speaking in a single scene to a minimum, if at all possible. Why? It gets really confusing really quickly. So try to limit it to 1 or 2, in general, and maybe 3 or 4 if you can't avoid it. Why?
"Who do you think you is?!" A demanded.
"Are," B corrected.
"Jeez. Can you believe this guy?" C shakes his head, truly worrying for the future of their species.
"Wha' a'e you on about?" A was confused.
"You said," E begins, shaking her head. "Who do you think you is. My partner simply corrected you by..."
You get the point. It's hard for the reader to keep track of all these people. While, yes, some scenes don't allow you to avoid this. Like press briefings, college classroom lectures, and police crime scenes. Try to focus on smaller bits, so the reader only has to keep track of maybe three or four characters, tops.