If I read you right, you're saying (a) that your stories seem to come out of nowhere, and (b) you've noticed yourself writing as a response to difficulty. And you're somewhat worried about this, or at least want to know if it's normal. Am I correct?
(a) is absolutely normal and not a problem. You have probably read some of us griping about dumb questions, and "Where do you get your ideas?" is usually listed as a dumb question. Why? 'Cause a lot of us aren't exactly sure where we get our ideas. A dream and a sentence and something we thought about last month fuse together all of the sudden, and the resulting chimera moves into our brain, rearranges all the furniture, and won't go away until we make a story.
(The other reason many writers think this question is a dumb one: contrary to popular belief, ideas are not the most important part of creating a story. That would be the TIC factor—Tuchus In Chair.)
(b) is also not a problem unless it becomes a problem . . . you know, that sentence made a whole lot more sense in my head. It's like this. Say some teacher gives you flack about something that's not your fault—being late because there were people necking in front of your locker, getting a cold and disrupting the class by sneezing every five seconds, something stupid like that. By this time, you pretty much know you have to pick your battles, and your best option is probably to say, "I'm sorry, Mr. Whatsis, I'll do better next time." And then, if you can't stop stewing, you write something about a phantasm from another dimension, and the person who saves the day is the savvy nerd who actually bothers to listen to the being rather than popping off and making stupid assumptions . . .
That's okay. You might even get something pretty good out of it. The problem would be if this is your only problem-solving method, or if it was taking over your life, or if you get caught doing it in class and get in any sort of major trouble. (Yeah, I did that. But stealthily.) If writing becomes your only possible way of coping with stress, if it becomes a compulsion rather than a pleasure, then you have a problem on your hands. (Of course, the problem might just be a much-higher-than-optimum level of stress . . . I've done that one too.)
As for friends thinking you're crazy, that's just a matter of finding the right explanation. "It's real," creates entirely the wrong impression. Try, "Yeah, it's fantasy, but I don't write it unless it feels right." Or, "I don't make it up, exactly. I just write what happens inside my head."
Izunya