Blowing hot and cold in a relationship can be sign of many things, but mostly that the person wants the control. They also do not want to get hurt.
It is so upsetting if this happens to you especially if they have been very keen, which they usually have been, as they want to be intimate with you. The important thing is to find out whether he is using you.
Sometimes they pull away because they feel that they cannot and never could make you happy. You could just ignore it for a while and see if things change.
You could ask them straight out why they are behaving this way. If they deny it and say that they don’t know what you are talking about then you know that you are in trouble.
He or she is probably immature emotionally and you will have to either finish it, or put up with the situation, which will probably never improve.
Often, they behave this way because they have been hurt in the past.
Ask yourself do you want to get involved with someone who is so unpredictable and lacking empathy.
They obviously just want the power over you, and you will just never be compatible.
They will also confuse you and make you unhappy.
So, your only choice is to walk away.