v2 signs the whole APK contents except the signing block itself (block ID 0x7109871a), so any modification is detected and verification is faster than v1's per-entry JAR checks. v3 (block ID 0xf05368c0) adds a proof-of-rotation lineage so an app can move to a new signing key; v3.1 lets rotation target newer platform versions only. v4 stores a Merkle-tree signature in a separate .idsig file for ADB incremental installs and requires a v2 or v3 signature as well.
apksigner sign and apksigner verify --print-certs handle all schemes; Google Play App Signing keeps the app signing key on Google's side and developers upload with a separate upload key. Updates must be signed by the same key or a rotated successor, otherwise installation fails. The APK signature inspector lists schemes, signers and lineage.