I am not sure if my issue stems from my own insecurity or if this is an actual problem that needs to be addressed.
My boyfriend of almost two years is an amazing guy. The only problem is, he is two different people when we are alone together and when there are others around. In the company of others, he is always trying to be the center of attention. He will leave for long periods of time, and I have no idea where he is. The last party we went to, a girl started telling me how cute he was and how he had flirted with her the whole night. After I said he was my boyfriend, she was shocked; there seemed to be no displays of affection between us, and he was busy doing his own thing.
Also, when we hang out with others, I feel like a fifth wheel. He doesn't make any effort to include me in the conversation. I've told him about this many times and there haven't been any changes. What should I do?
Decide if this is the way you want to live your life, and adjust your relationship status accordingly.
You probably want to hear something more definitive -- maybe "Yes, this is clearly your insecurity, so just carry on as if nothing is wrong" or "Wow, he's clearly in have-cake-and-eat-it-too heaven, since he enjoys the security of your love while shopping around for more and better attention whenever he leaves the house."*
But, I'm not in a position to decide whether he's taking advantage or being innocently gregarious, nor would my opinion be relevant if I were. You are unhappy with the status quo, so you need to respect your feelings and change that status quo -- in ways that don't include asking and waiting for him to change for you, or rationalizing your discomfort away.
*Ding ding ding.