Think of bits as light switches. They can be 0 or 1, off or on. Any set of bits can be represented by a single number. Changing any of the bits will change the number, so every arrangement of possible bits in the set will result in a unique number.
Two use cases where utilizing setbit and getbit are common would be a bitwise auto tiling function for tilemaps and multiplayer client input states.
A general case would be when the state of any single thing depends on the state of multiple other things. A single number variable to keep track of this utilizing bits can be convenient, but it's not the only way.