Write what you know is one of the great maxims in the writing world. Take your own world experience, your life as a unique individual, and write based upon that. But what if you're boring? Where you live is boring? The people you know are boring? What if you've had an easy and simple life that has brought you happiness and contentment? No one wants to read about that. (Unless you're writing a self-help how-to book but who believes those?)
Now, I don't think my life has been all roses. And I've done some interesting things and lived in interesting places. But truthfully, it's all kind of boring to me. I mean, I lived it. I already know myself. It may have been new and exciting at the time, but I don't want to live in my past. I like learning new things. So that's why I like to just make sh*t up.
This may not be useful advice for everyone. And we've gotten a lot of great literature from our writer's of experiences (Hemingway, London). But I freely admit that I write about things that are well outside of my personal knowledge. But there are a few different ways to go about this that are useful.
First off, I do believe in research. You don't have to experience everything but it really helps if you know some of the truth about it. You don't have to be a marksman to write about someone shooting a gun, but if you have the character shoot off fifty rounds from their revolver you will lose your reader. If you set a story in Seattle and the weather's always sunny, it doesn't ring true. And it's not just physical facts that you can research.
What does it feel like to suffer heroin withdrawal? What type of upbringing is likely to create a shallow and thoughtless antagonist? You can study these things as well. Learn a little physiology, psychology and societal trends. All of this helps to make whatever you write more consistent with reality, the reality that the reader lives in. Regardless of how fantastical your world may be, the reader needs to connect with it and understand it in order to believe in it. And that all starts with the world we all share. So get that stuff correct and you can go from there.
But what about the stuff that research just can't tell you? For instance, I don't know what it's like to lose a child. Never happened to me and I certainly hope it never will. But that doesn't mean I can't write a character who experiences it. Will I get it right? Well, maybe there isn't a 'right' to get. Everyone experiences life differently and there is no single response to a situation. The question is whether or not my character is realistic. If their responses and emotions are consistent to the point where the reader believes them. And that's what is interesting to me: trying my very best to imagine the situation and character and create something that is realistic. That is the mental exercise that allows me to explore things that are not a part of my real life.
Of course, I have to draw on the experiences that I have had in order to have a basis for everything else. And it's that truth that holds the lies together. I have known death. I have known love. I have been young. I have gotten older (in spite of my best intentions). I can put those things together to make something new and different. But without putting yourself into your characters, without starting from your own truths, you will end up with empty and false stories. As writers we have the ability to create, but we must build with solid materials to end up with a stable structure.