A reference group is a group against which one compares her/himself. Reference groups are experienced as a standard of measurement.
A quintessential, famous example of a reference group is a class reunion. Other reference groups might be religious congregations, coworkers, or even sports teams on television. Reference groups might be in conflict: while classmates might celebrate sexual exploration, a religious congregation might promote total celibacy.
Primary and secondary groups are relative to one another, but they generally have some defining characteristics. A primary group is generally small and engages in face-to-face, long-term, emotionally-invested interaction. A primary group (as opposed to a secondary group) carries the most influence in one's life. This is best exemplified by family. Secondary groups are generally larger and impersonal and would include single-semester classmates.