For compatible shapes, $A0=0$ and $0A=0$. Every product entry is a sum of scalar products containing a zero factor. The zero matrices on the two sides can have different shapes. The converse fails: nonzero matrices can multiply to zero.