A ward is an obstruction inside of a lock to block an un-cut key blank/or the wrong key from turning. A lever is a type of lock tumbler that gets lifted by the flag of the key, as it rotates, lifting it to the right height and allowing the bolt to move as the key finishes it’s rotation. The wrong key will either lift one or more of the levers too high or not high enough causing the bolt to stay in place and stops the rotation of said key (keeping the lock closed).
It is very hard to explain this clearly without a visual aid. You really need to see a cut-away lock and watch it open and close in order to understand. Basicly, little differences in the cuts on the key change things quite a bit inside of the lock. They put different levers and different wards inside of locks so that one key doesn’t open everyone else’s lock and their keys won’t open yours. I hope that explains it a little.
Cheers, Mike DC/