It depends on whether the group, in the context of the sentence, is/are being treated as a group or as individuals. I will provide examples using class first:
The class receive candy for participating in discussions.
Here, I use the plural "receive" because I speak of the class as a plural noun composed of individual students, and these indivudal students each receive a candy [well, whoever in the class participates]. If I had said, "the class receives candy," I would mean that the class as a whole receives a sum of candy (to dispense among themselves).
The class goes on a field trip once a year.
Since the class must travel together as a single group, and since they probably do not travel individually, I use the singular.
Now as to group of people:
A group of people is playing soccer.
I use the singular because they are not each playing soccer by themselves in a group, each to his own game of soccer! Absurd! Rather, they play soccer together as one group in one game.
I know it sounds crazy, but this is how I think it works. Here's another example that doesn't sound as awkward:
A group of people is forming around that tragic accident.
Others may disagree, but this sounds natural to me. I would not say "a group of people are forming." Some final evidence that I think is is right is if you flip around the sentence: "There is a group of people playing soccer." This sounds natural to me, too. "There are a group of people" sounds awkward. And there are many more words like "group" and "class":
- That flock of birds is in a V-formation.
- The bag of onions is on the table.