I was confused about this, like they're changing prices in the store when I get near?

I hear that a lot but not sure how it would work. What if two people are standing there? How do they know what price you saw when you go to pay?

I think it only makes sense for online shoppers (and there it does make sense)