The other thing to consider is if you want to store your (manual) ratings in the media file tags or in a seperate database. If you install the above Playback Statistics (PS), it takes over the %rating% field and stores them in its own database. You might prefer this if you share music with other family accounts so they can have their own ratings, and just because ratings are subjective - your three star might be someone elses five star.
In any case with PS installed, you would access database ratings with %rating%, and file tag ratings with $meta(rating).
If you want easy convenience to actually rate files, instead of using default playlist viewer, you might try SimPlaylist which has custom columns for ratings where you simply click the stars. Very useful. You can use either the 'Rating' column to tag files, or 'Rating DB' column to tag to PS database if also installed.
Then to sort tracks by rating, you would simply click the rating column. You could also make a grouping pattern to show tracks in a 5 star group, 4 star group, etc.
Otherwise ignoring all the above advice, you can use the old-fashioned method - just add a new column yourself, something like -
Then you would have to add the %rating% field to your files as well, with a value of 1 to 5. If you are not using PS, this could be automated using Masstagger component instead (available for keyboard shortcuts and toolbar buttons) ...
There are lots of ways to do stuff in foobar