Alright, I'm just gonna use an example:
"Mother said, 'You two could go after Adam is done with his homework'" uttered Alex.
Adam is quoting what his sister (Alex) said and Alex is quoting their mom. So you put the single quotes when the other person's (or article's) dialogue begins and ends :)