Why does my ex act mad, avoid me, then get jealous when other guys talk to me?

What do you think?