Boy shows 2 sides?

when he is with me he is very sweet and all over me. When he is away nd i text him he gets angry with me whenever i say things and says the meanest things, like really mean. Like he has rwo faces? what is his problem?