Why this girl act hot and cold?

So this girl and I had many arguments based on misunderstanding. We had to talk few times for serious things. With time she started to flirt with me and try to show me that she knows my name. I did not know if she was really into me or just trying to calm me down through flirting. She is pretty and probably has list of guys waiting for her attention. She used to be shy looking at me but one day she stood up right in front of me stared into my eyes and did not look away. Then other times when we talk and I look at her eyes she avoid smiling and look away. So sometimes I like her sometimes I don't trust her. Anyway she started to act hot and cold with me sometimes she gets angry our of no where. Every time she acts pissed I just back off until she calms down and starts to say hi again. Anyway last four times we talked she acted hot and cold.
first I went to ask her and she was inside a room and busy then she yelled at me saying could you please just get in!
first time she scared me, i talked to her then she ignored me said have a good day ad walked away.
so I took as she doesn't want to say hi anymore.
few days later she saw me she hey and my name how are you?
i said hi and held the door for her.
Then few days later I was sitting minding my own business she walked pass me looked at me smiled and said hi how are you my name.
i replied to her.
two days ago I went to her she smiled at me and said hi i asked her of we can talk she said she said sure i asked her if i can close the door she said sure. I needed to talk to her about something serious. She was surprised and did not know what to do like being alone made her nervous. In the middle of the conversation she asked me to sit if i want to. By the end when i stood up to leave she stood up came closer to me leaned on the table with her arm stared into my eyes smiling. I felt the whole situation was too intense so I kept talking normal but she acted much nicer than before. Can someone tell me whats going on?
Why this girl act hot and cold?
Post Opinion