When an undergraduate student takes one of my graduate courses, they're graded in exactly the same way as the graduate students in the class. Numerical grades are assigned for individual homework assignments, exams, and projects, and a weighted average is used to compute a percentage grade for the entire course. Letter grades are then assigned on a scale where 90-100 is an A, 80-90 is a B, etc. I reserve the right to ease that scale (e.g. at the end of the semester I might lower the cutoff for an A to 88% or even 85% if I feel that the cutoff was too high.)
Our university has no rule that explicitly prohibits undergraduates from taking graduate level courses (although the courses may have advanced undergraduate prerequisites that would keep out all but the most advanced undergraduates.) However, since the graduate courses won't satisfy requirements for the bachelor's degree there's little incentive to take a hard course that will only be useful as an elective. Most of the time when we see undergraduate students in graduate level classes it is because they're in our 5 year BS/MS program or they're committed to going on to graduate study somewhere else. These are highly motivated students who are generally well prepared.
It's certainly been my experience in teaching graduate courses that most of the grades that I assign are A's and B's, and that this is very different from undergraduate courses where I often assign lots of C's, D's, and F's.
However, this happens mostly because all of the students in the graduate program are students who consistently earned A's and B's as undergraduate students (they wouldn't have been admitted otherwise) and they typically continue to perform at the same level as graduate students. In those few cases where a graduate student does earn a grade of C, D, or F, it's often because of some significant non-academic problem (illness, depression, death in the family, etc.) rather than lack of ability or effort.
At the undergraduate level, the majority of low grades (D's and F's) are assigned to students who simply don't put in an effort to pass the course. A few undergraduate students try hard but genuinely lack the ability to do well.
When undergraduate students who are well prepared (with A grades in advanced undergraduate courses) take my graduate level courses they typically do almost as well as the graduate students in the class. When poorly prepared undergraduate students have attempted to take my graduate courses they've often ended up withdrawing from the course or failing.