When creating a Smart Playlist, what does rating refer to? It doesn't seem to refer to the iTunes assigned rating, but this could be because iTunes isn't updating the ID3.
It is the iTunes assigned rating. The ratings are 20=1 star, 40=two stars, 60=3stars, 80=4stars, 100=5 stars.
They get them from the appropriate id3v2 tags (POPM, iirc) and aac tags.
It can also supplement it from the ituens music library.xml if it's in the music path.