When you're typing out a novel's title or a movie's title or a magazine's title you ought to use italics. To send in a manuscript to an agent, though, you ought to underline them. They'll appear in italics in the story or the book or whatever.
When it comes to short stories or poems or an article in a magazine, use quotation marks.
Example: The Shining by Stephen King . . . And then: "Everything's Eventual" by Stephen King.
My English teacher gave us a useful analogy for this. If it's a "heavy" piece of literature, like novels or anthologies, et cetera, use a shelf. If it's lighter, use "hangers."