I am not sure about the main difference between saying "I am working under a professor" and saying "I am working with a professor".
Working under someone implies supervision by this other person. If you work under Professor X, it means Professor X will direct your studies, your research, etc. and you are not their equal.
Working with someone should imply equality between the co-workers. This being said when with is used you have to consider the position of each person and if you are a student and you work with Professor X on your thesis, which could also be said, (I'm using the term with the UK sense, I gather the system is different in the US) then of course there is no equality and you are dependent on Professor X.
If you are working under a professor means you are employed by the same college or university.
But if you are working with a professor then you can even be a freelancer. For example, suppose you and the professor are working on a book. Then you are not his employee but more of a partner in business as you two are working on the same book.