This is a weird case. It can mean a lot of different things . It depends on the guy and the situation, so I can't give you an exact answer. But I can give you an idea of why this "usually" happens.
First, it could mean that he saw something/heard something about you that he did not like at all and he wants nothing to do with you. It's unusual for people to just suddenly ignore you just because of something you've done, but there are some who do. This guy could be one of those guy.
Second, it could mean that the guy actually never really liked you in the first place (friend or otherwise) and was just being nice before. But now he's getting tired of you and, to put it harshly, wants to get rid of you.
But don't be discouraged just yet. Those are just possibilities. You could probably clear things up with the first one if that's what happened but the second one is kind of a lost case. And then it could have been neither of the two. To know for sure, you need to confront him about this because he is obviously too much of a wimp to confront you himself about why he's ignoring you.
I wish you best of luck.