Yes, in most cases they do—but it’s not magic. The bin has a motion sensor, usually infrared or radar, near the lid. When you walk up or wave your hand, the sensor notices the change and sends a signal to a small motor or latch. That releases the lid, and sometimes a spring or motor lifts it open. After a short delay, it closes again.
That said, not every “motion sensor” bin works the same way. Some are just touch-free and need your hand quite close to the sensor. Others may still use a foot pedal or button. In busy city spots, the automatic version is popular because people don’t have to touch a dirty lid.
Reliability depends on the unit. Battery-powered bins can slow down when the battery is low. Dirt, rain, snow, and rough handling can confuse the sensor or jam the hinge. Some heavy-duty urban bins are designed to open only partway or have a manual backup, and some public bins don’t open automatically at all for safety and maintenance reasons. So the short answer is yes, many urban trash bins with motion sensors open automatically—but only when the sensor, power, and mechanism are all working properly.