There are G sensors connected to a small computer, battery, display and usually some Bluetooth for the link.

This would make for your basic activity sensor rig. How it syncs with android/iOS is usually over a link. Said link can be wired or wireless.

If you want to go deeper take a few courses in electronics and embedded computing. If you want to dive into this without that look up the Arduino kits and what sensors you can add to that.
Bob