Mob mentality refers to the fact that people will act in unison with the behaviors of the others around them because they identify with the group in one way or another.
In regards to Shirley Jackson's short story The Lottery, mob mentality certainly affects the behaviors of the community members.
That being said, one first needs to understand that not all mob behavior has negative connotations. For example, look at the current fad brought about by flash mobs. Flash mobs function under mob mentality. The members of the "mob" are unified by the behavior being acted upon. While, historically, mob mentality has had negative connotations, it can be seen as a positive thing as well.
As for the mob mentality in the story, the community is coming together under the traditions of their culture. The community has lived by the rules of the lottery and agree to take part in the lottery simply by showing up.
The mob mentality is compounded by the way that the tradition of the lottery continues. This is seen by the boys who collect rock piles and guard them against the attacks of other boys. The boys are taking part in the mentality of the elders of the community. Simplistically, this is a learned behavior and is not impulsive (as seen in more violent mob behavior).
Mob mentality involves lack of individual decision-making. When people are in a large group they often feel that their behavior is disguised by others who are doing the same thing. In addition, mob mentality involves a psychological contagion; that is, people join an activity because others are engaged in it and there is a certain excitement generated that can reach a feverish crescendo.
In Shirley Jackson's "The Lottery," as the people anticipate the annual lottery, they assemble a little uneasily while they say such things as Mrs. Delacroix does to Mrs. Graves. "Seems like there's no time at all between lotteries any more."
While the townspeople assemble, people separate "good-humoredly" to let others through, or they urge their husbands to get in place for the drawing:
"Get up there, Bill," Mrs. Hutchinson said, and the people near her laughed.
Then there is a nervousness that turns into an irrational excitement as each person opens the slip of paper that he or she has drawn. When the slip is revealed with the black dot, it belongs to Tessie Hutchinson. The townspeople hurry now with stones in their hands. Mrs. Delacroix, Tessie's friend, has a stone so large that she must pick it up with two hands. An electricity runs through the crowd. Little boys run with handfuls of stones. Old Man Warner shouts, "Come on! come on!" The townspeople are infected with the lust for blood and they rush unthinkingly to be able to stone Tessie Hutchinson--but it could be anyone. This is mob mentality, and it is what makes the lottery a ritual, and one that people enjoy every year.