Yes, with labels and filters, and you can set all kinds of conditions including the subject lines of the email and the senders and user filters to both label and sort them into folders, star them, mark them as read, etc.
I do this to auto sort my inbox into a bunch of different folders and groups.