Much of our use of language is pragmatic, goal-oriented. Our speaking or writing does not emphasize style. For practical writing, clarity, accuracy, and economy are the primary virtues.
We use language pragmatically to make requests, give orders, convey information, and to persuade other people. Textbooks, letters, manuals, memoranda are all examples of pragmatic writing.
Once a piece of pragmatic writing has served its function, we are no longer interested in it. No one rereads a memo to savor its style or discover new nuances of meaning.
Literary writing may also have pragmatic purposes. But its primary purposes will be different. While a piece of pragmatic writing should have a single, unambiguous meaning, literary writing has "surplus" meaning--a poem, play, or novel has more meaning than any one reader can encompass. Readers can return to it and discover new meanings or new aspects of previously discovered meanings.
Literary writing attains surplus meaning largely through its use of symbols. Defined broadly, symbols have a richness of meaning that attracts and energizes the reader's imagination.
Literature also emphasizes the language it uses. In literary writing, style is part of the meaning, and style is a major part of literature's appeal. If you don't like the way Stephen King writes, you won't read his books, no matter how much the plots or settings appeal to you.
A reader can return repeatedly to a literary text, reading it each time with new understanding and enjoyment. Readers return to pragmatic writing only when they need the information again.
Not all verse, fiction, or drama is literature by this definition. The definition I'm offering depends to a great extent on the reader's response. If you read only for pragmatic reasons, then your reading is not literary. Remember that both pragmatic and literary writing and reading are essential to our lives as human beings. Making the distinction will help you be more aware of your own reading and make you a better reader of all kinds of writing.