Just check the credits...
Produced by:
Mixed by:
Usually there will be a mixing engineer listed.
Dr Dre mixes his own stuff I believe. Some producers may mix their stuff sometimes.
Take a look at Timbaland's masterclass video, I think he has an engineer there mixing as he produces. Timbaland also does some mixing stuff; but in the video i mentioned I saw him put like a wamp high shelf boost on his kick, pretty sure I see the mixing engineer then use an eq to cut that same boost.
There's an old old incredible video of Scott storch making a beat. He has an engineer present at the time making adjustments to what he's doing (I do believe).
WARNING: this video will either demoralise you or inspire you.
Dr Dre..
Also bear in mind, a lot of producers will make the beat, the beat will get sent to the artist to record and a mix engineer will receive the stems to mix the whole thing.
It can happen in varieties of ways.
Young Guru mixed a lot of if not all of the Roc A Fella stuff.
There's probably some crossover too - some producers likely "mix as they produce" and you can argue whether it's mixing or sound design. Or both. Some may produce dry and let the mix engineer do the work. Some my mix whilst producing then take their processing off when sending to the mix engineer but bounce their mixed version as a rough/guide mix so the engineer can see what they're trying to achieve.
I sometimes take a mix as I go approach, moreso when it comes to drums cause I may want to first know if they can sound as I want as a unit before bothering with the rest.
So there's no hard and fast rule, think of any combination and it's likely practised.
Then it goes to mastering ( :
And sometimes a mastering engineers job is merely just to make it louder if the mix is good, or simply say "I don't need to do anything to this record."