With fiction, I want to entertain by leading the reader on an exploration. I attempt to involve them on the first page and have them salivating to find out what happens in the rest of the book. I encourage questions to enhance the experience. Show, not just tell, a story. Make it easy for the reader to grasp the picture I'm painting and formulate their version in their mind.
With non-fiction, which is what I began my career doing in articles for newspapers and magazines, the job is to inform. Facts must be accurate and information precise. Names, dates, etc. must be checked and re-checked. If something's amiss, somebody will catch it and call me on it. The trick is to keep the words flowing and not be dry. I've been reviewed as "making learning history fun".
Sometimes, though, I stray and go into non-fiction mode while writing a fiction story. I have to go back and scrap those paragraphs, eliminate words and get back on track to lead the readers into some new place. I've also strayed into fiction mode while writing articles. Editors don't like this, either. I have to tighten up and include sources while not assuming or assigning frames of mind to characters. It's all about editing while keeping my writer's voice. Learning can be fun, but with a novel (historical fiction is my genre) it needs to be involuntary. Get caught up in the story and gain knowledge despite yourself.