If such situation occurs, the student may be found guilty of 'plagiarism'. That basically means illegally copying other people's work without their permission. But if you include everything in the quote (such as the name of the author, and quotation marks), then it wouldn't be considered plagiarism.