Frequently we tell someone what some else has said or has written down. This is called quotation or citation. In Korean, quoting someone is a rather complex thing to do, but the absolute basics, direct quotation, is quite simple actually.
People often refer to direct quotation to the act of using quotation marks when quoting someone. Funnily enough, that is quite accurate. In Korean, it is the same. It a word-for-word representation of what someone wrote, said or thought. At the end of the quoted sentence (so after the closing quotation mark), you either use 라고 or 하고 followed by at least a verb indicating the act which you quoted, like 물어보다 (to ask), 이야기하다 (to tell), 말하다 (to say), 쓰다 (to write) and 생각하다 (to think) are used. However, you can also use 하다 (to do) or 그러다 (to say, to indicate). The part after 라고 and 하고 is similar to the uncontracted form of indirect quotation.
Also note that when asking after what someone wrote, said or thought, you use 뭐라고 instead of 무엇을.
Treat the quoted sentence as a separate sentence rather than part of the sentence. You will conjugate the verb in the quoted sentence. And regardless of the rest of the sentence, you use all particles, etc. as necessary. This can lead to sentences with the topic particle 은/는 appearing twice.
가: 카럴 씨는 뭐라고 했어요?
나: “방학후에 너무 바빠서 못 만날 거예요.” 하고 그랬어요.
A: What did Carol say?
B: “I’m so busy after the vacation that I won’t be able to meet you”, she said.
How To Use
Direct quotation is rather simple in Korean. I feel it is even easier in English, but there are still a few things to keep in mind. When you quote someone, you first write the sentence you are quoting. Do not forget to add quotation marks since we are doing direct quotation. After that, you either use 하고 or 라고 followed by the rest of the sentence which ends with a verb like 말하다 (to say), 쓰다 (to write) and 생각하다 (to think) are used. However, you can also use 하다 (to do) or 그러다 (to say, to indicate). After all that, you are pretty much done. Korean direct quotation is that simple.
However, there are a few caveats you need to be aware of. When the verb of the sentence you are quoting and the verb of the entire sentence are 하다 verbs, you have to use 라고 instead of 하고. This is because consecutively using a form of 하다 simply sounds awkward and you ought to avoid it when possible. Using 하고 in those kinds of situations is considered a grammar mistake (important to know for those taking TOPIK II).
Also, keep in mind that there is a slight nuance difference between 라고 and 하고 in direct quotation. 하고 implies you conveyed both what was said or written, but also the feelings and the intonation of the words you cited. It is why 하고 is often used in fairy tales and children stories. 라고 does not carry this implication and you will hear it more often in daily conversations.