White box testing is a type of testing where the internal functionality of the system is considered. It involves the source code to check for parameters like optimation time etc. White box testing is low-level testing.
When you ask, how is it different from black box testing,
Black box testing does not involve the internal functionality of the system and the source code, on the other hand, white box testing is done based on the source code and the internal functionality of the system.
You do not need any programming knowledge to perform black box testing but you need a great amount of programming and tools knowledge to perform white box testing.