Ask your friend what's going on, in a non-confrontational way (as in, don't ask "Why are you ignoring me?" but "I feel like there's something wrong - did I do something to pi$$ you off?").
How old are you, by the way? If your somewhere between 13-16, then this is just what 'friends' do! Very petty and ridiculous, but they grow out of it eventually. At that age, everything is a major trauma and the end of the world.