With fiction, we have two very interesting elements at play. The first is the need for realism - as you're writing, you want your readers to feel as if they are right there in the story. If you've read Harry Potter, for example, you'll notice so many strong and believable details that the magical place seems like something that could actually exist.
The second element, of course, is the fiction - even though the words and images give the sense of a real place, we often talk about stories as if they are entirely made up. And I think this is one of the reasons that many people find it difficult to write fiction - they become so caught up in the art of manufacturing a story that it never comes out naturally. It feels forced rather than fluid.
To bridge these two separate components of fiction, most writers base their fiction at least somewhat on personal experiences. Going back to the Harry Potter example, J.K. Rowling's days at a boarding school clearly gave her a good idea of how students and faculty interact in the confines of a place that's both home and school.
This isn't to say that you must base a story on your own life - it just helps to lift some of the details. Usually, you'll find that you don't exactly have to plan out how to do this. In writing courses, many teachers now push students to use freewriting as a way to let out their ideas. In freewriting, you set a timer for about ten to fifteen minutes and just start writing as fast as you can. The goal is to ignore the doubts and to let your unconscious mind free to express whatever seems pertinent. Often, you'll find that the unconscious mind will automatically bridge the gaps between fiction and reality, providing those strange details from life that are needed to bolster the fictional theme you're working on.
The one thing to note, however, is that you won't be able to control what comes out as you freewrite. In fact, you want to avoid control. If an idea comes to mind, write it down. Let it out. If you don't like it, you can always scrap it later.
I hope this helps.