I'm trying to understand how bitcoin mining works and some things don't make sense, as to my understanding of mining, a bunch of data is hashed and if the resulting hash has more leading zeros than the target difficulty value then you have a valid hash and your block is confirmed. If I only need to make around 2,147,483,647 hashes, then wouldn't a mining pool be able to guess an acceptable answer very quickly?
First, while the original white paper talks about leading zeroes, it doesn't actually work that way. The actual test requires that the hash's value to be less than a "target" value.
Second, I don't know why you would think that 2
31 hashes would be sufficient. Hashes have 256 bits. Currently, an average of approximately 3x10
22 hashes are required to find a block