When you use a quote in your paper, or when you state specific facts or summarize someone else's ideas, you need to give credit to whomever you got the information from. If you don't give them credit, you are passing off someone else's ideas as your own (plagiarism).
If your source is a book, you put the author's last name in parentheses after the closing quotation marks, but before the punctuation.
For example:
"Then, one breakfast time, Hedwig brought Harry another note from Hagrid. He had written only two words: It's hatching" (Rowling 234).
Or, if you mention the author's name within the sentence, you can just put the page number as the citation, like this:
Rowling writes in chapter fourteen, "Then, one breakfast time, Hedwig brought Harry another note from Hagrid. He had written only two words: It's hatching" (234).
In chapter fourteen of J.K. Rowling's Harry Potter and the Sorcerer's Stone, Hagrid sends Harry a note to tell him the dragon egg is hatching (234).
Notice that the period always comes after the parentheses, not before.
Rowling, J.K. Harry Potter and the Sorcerer's Stone. London: Bloomsbury Children's, 1997. Print.
The format to use with books is:
Author's last name, author's first name. Title of book. City of publication: Publisher, year. Medium.
*Medium is the singular of the word media. Print is the medium for books, just as web is the medium for something you find online.