My daughter is 2 years old and usually quite active. However, when guests come to our home, she is kind of very scared, goes inside the room and sits alone. We are a bit worried about this behaviour of hers. Sometimes she will mingle with them for some time and again goes inside. Is this normal?
There isn't enough in the question to say there's a problem, for three reasons:
More detail would be needed to get a better sense of how disruptive and how frequent the behaviour is, as well as how much distress or contentment is associated with it.
She's pretty young and new experiences are scary. Once it's a less new experience, if the behaviour hasn't developed in any way, it'll be easier to tell if it's problematic.
The behaviour of hiding from company is well within the bounds of introversion or high sensitivity at a young age, which affects up to 1/3 of the population. For more, look at the chapters on children and parenting in Susan Cain's Quiet. If a child is content with their coping strategy, and they're not afraid to test the limits of their comfort (like your daughter with the occasional mingling?), she recommends that parents check their assumptions and make sure they're not pushing the child to be something she's not through shame.
Note that even the last hypothesis doesn't exclude there being a problem or a solution. Cain defends introverted behaviours as normal, but she also believes that introverts need strategies for dealing with social sensitivity so they can live with as few interruptions as possible. If your daughter does turn out to be strongly introverted and both she and you are aware of it, it could be that taking some time alone during social events is a valid way of charging her batteries so she can also put her face out there, meet people, and have a social life without letting the fear shut her out of all interaction.
Take the last notes as pure speculation given how little detail there is and how young she is. :)