To put it in simple terms:
Under Black box testing, we test the software from a user’s point of view, but in White box, we see and test the actual code.
In Black box testing, we perform testing without seeing the internal system code, but in WBT we do see and test the internal code.
White box testing technique is used by both the developers as well as testers. It helps them to understand which line of code is actually executed and which is not. This may indicate that there is either a missing logic or a typo, which eventually can lead to some negative consequences.