A "selfie" is a photo that someone takes of themselves. It is both seen as a positive thing by some and a thing to be derided as shallow by others.
A selfie can be taken by anyone, however it is most commonly associated with young women taking selfies for social media. Of the people who hate selfies, some believe selfies to be shallow vanity, and others see them as repetitively annoying, like that one friend of yours who is always posting photos of their food.
Selfies can be useful. One friend of mine has a condition where she does not recognise herself in the mirror and her health professional recommended she take selfies for social media to help her become more familiar with herself. Or when a group of friends have gathered, instead of one person not appearing in the photo due to being behind the camera, they can instead take a selfie with everyone else in the frame as well. Bands will sometimes do this during concerts; Brian May took a selfie with the audience at recent Queen concert I attended, and Postmodern Jukebox often posts on social media with selfies with the audience at their latest shows.
Selfies can be taken for any reason; to show off a great oufit or costume, to show yourself at a famous location, to document yourself having a great time with friends or family, to show how tired or crappy you are feeling to sympathetic friends, to show people just how close you are to the stage, ...the list goes on. Photos with people in them have been around for ages, the only difference now is that instead of asking someone else to take a photo for you and possibly trusting your camera to a stranger, one simply turns on the forward facing camera on their smart phone and does the job themselves.