Why they use "what would you do" instead of "what will you do" in the following sentence? Or there is no difference between the two at all.
If you don't understand your assignment and you can't reach your boss, what would you do?
As written, the scentence isn't well-written. It would be better written in one of these ways:
If you don't understand your assignment and you can't reach your boss, what will you do?
What would you do if you didn't understand your assignment and couldn't reach your boss?
I changed the order in the second sentence because if I started with "If you didn't understand...", it would sound like a question about the past, and the clause "what would you do" would be a bit confusing. Putting the sentence this way round makes it easier to understand.
The first sentence means that the speaker thinks it is very likely that the other person won't understand the assignment and be unable to contact the boss. It's a real possibility.
The second sentence is hypothetical. The speaker is asking the other person to imagine a certain situation, but is not saying that it will happen. It's an imaginary situation.
If you saw a large crowd of flesh-eating zombies coming towards you, what would you do? That's a hypothetical situation -- it's probably never going to happen, but just suppose...