Having sat on both sides of this, I can give a little perspective from the instructors.
As Ryan said, your flight commander should give you a mid-mass rank where he ranks you as top, middle, or bottom third. I don't believe it's mandatory, though, because we skipped it several times just due to being so busy. On the final ranking, he should give you your actual position in the class (if not, it will go on your 1122 as Ryan said).
And like PAB and Bergman mentioned, the top and bottom are usually obvious with the middle being the difficult ones to decide. The rankings usually involve all the instructors in the flight and start with the easy choices - picking the top one or two, then picking the bottom one or two. On occassion, we'd argue for over an hour trying to rank order the last four or five guys. This is where your attittude and 'officership' comes into play. Neal and Bob may be running neck and neck until IP #1 says, "Yeah, well what about when Neal aced his formation checkride and didn't pass the info to any of his buds, and somebody hooked for the same EP." Wham, Neal goes to the bottom. Also, IPs are very aware of things you may not realize - I couldn't stand dudes who brown nosed us, then were dicks to their classmates. Straight to the bottom of the pile.
Also, we've ranked people in that middle portion based on what type of aircraft it would get them. If a guy was good enough to graduate, but we really didn't think he belonged in a fighter, we'd rank him so he'd get a bomber.