I have played several games where my opponent's queen is somehow placed in the center of the board. However, this type of aggressive move positions my king in a dangerous spot. I can't castle because the queen can work with a bishop and provoke a checkmate. My other pieces are vulnerable to an attack because of their early piece development. I keep getting check after check because my king is in the center. It forces me to use my other valuable pieces to defend my king. This will eventually result in allowing my opponent to break my defense and slowly take out my pieces or, even worse, force my pieces to retreat. What is the best approach when this type of situation is encountered?
The best approach is to prevent it. If you haven't castled, and your opponent's pieces are developed, you've already made several grave mistakes.
Post your game and we'll review it.
There are a number of openings that are known to result in good positions. Do you know which one you play?
EDIT - @toby ok, for what you do, is learn how to play the Ruy Lopez and Queen's Gambit with white. Learn the Grunfeld and Caro-Kann and play them when you have the black pieces. These are well known and solid openings. They will prevent the situation in which you find yourself.