Парень is a word I'm comfortable using in Russian because I liken it to our guy in all its nuances. However, although I see and hear мужик all the time, I'm hesitant to use it because it seems that I've only ever heard it in negative contexts, e.g. about deadbeat boyfriends or fuckwit husbands or generally with a disparaging air like some guy at the bar pushed me and I spilled my beer (=some fucker); or She walked in with this guy with a porn mustache and an unfortunate laugh... I think you get the picture! Is this my imagination, or is it closer to парень than I think?
It's almost like in Zootopia, remember, one bunny can call another bunny cute ) The same about
мужик it's very informal and may be perceived (and intended to be such) as rude if a man is addressed by a person who is not a close acquaintance or is higher in rank (social, job, military, whatever).
мужик is definitely not used only in negative contexts. Say you are trying to move some heavy objects from your backyard. Saying to your friends something like "навалимся, мужики" will sound very friendly.
Or consider the rather common phrase - which is also used ironically, though - "ну ты мужик" (something like "you are quite a man").
As for "парень" - this also can sound rude if it's intended to sound rude ("эй, парень!") - in Russian language actually even "большое спасибо" can sound rude if pronounced with certain intonations.
But generally it just refers to young men. For instance, a sports commentator can say something like: "Парни на воллейбольной площадке выложились сегодня по полной!".
So to summarize:
- Парень - a young man, dude, lad, mate, guy; used quite widely.
- Мужик - either rude (when addressing somebody) or quite friendly informal word used in a close group of friends. Sort of something between "nigga" and "bro." Used relatively rarely.
Both could be used to describe a third person: У дверей стоял хорошо одетый парень. К нам подошел здоровенный мужик.
The difference is assumed maturity парень has a side meaning of being young.
Both are acceptable when addressing multiple persons directly: Мужики/Парни, что здесь случилось? Both are acceptable when addressing friend(s). When addressing an unknown person both have carry some rude intonations but мужик is softer.
In all cases of direct addressing мужик is way more popular.