The literary technique you're describing here is called the historical present. Sometimes the author of a work of fiction (or even some nonfiction texts like biographies, autobiographies, or histories) will talk about a past event as if it were occurring in the present and will use a set of present tense verbs to do so. This technique is often for emphasis. The author wants to involve the reader intimately in the story and make the reader feel as if they are directly experiencing it.
If you want to incorporate this historical present into your writing, the first thing to remember is to use it sparingly. This technique is for emphasis, so it should be used mostly in especially important scenes that you want the reader to experience almost first hand. You might use it at the very beginning of a story, for instance, as you are introducing your plot and conflict, for it draws the reader in and increases interest. But after that first scene, switch back to the regular past as you develop your plot.
Another good place for the historical present is at the climax of your story. Again, select one scene in which to use it in order to place your readers directly into that scene. It is, after all, the high point of the action, the place toward which the whole plot has been moving. Extra emphasis would be appropriate.
You might also use the historical present for a flashback scene to differentiate it from the surrounding scenes and make it stand out. Then switch back to the regular past tense as you return to the regular storyline.
There are quite a few authors who successfully use the historical present. Charles Dickens uses it in Bleak House and David Copperfield, as does Charlotte Brontë in Jane Eyre. Margaret Atwood goes even further with her use of the historical present and writes her entire novel The Handmaid's Tale in it.