Will can be used in a variety of situations. In this sentence, it simply means that it has not been possible or is not possible to open the lock.
I have been trying so hard but the lock won't (will not) open !!
No matter how hard you try, the lock will not open
See more usages of "will" here :)