While condition with & bitwise of PINx read
SPI transmitt is started by writing one Byte into SPDR. And this code won't return from SPI_MasterTransmit function before it's complete. Transmitt completition is anounced by setting SPIF by hardware (and if SPI interrupt and global interrupts are enabled, it'll run also ISR and clear that flag).

If you write into SPDR before transmission is completed you'll corrupt current "transaction", so you have to wait until it's complete before another write.

Bitwise &amp; is used for bit masking. Bits in the result are set if bits at corresponding positions in arguments are both set:

0b00110011
         &amp;
0b00100001
        ==
0b00100001


So if bit at position SPIF is not set, it will loop again and when it's set, it exits the loop, as there is inverted logic.

( SPSR     &amp; (1&lt;&lt;SPIF))                    !(SPRS &amp;(1&lt;&lt;SPIF))
0b0xxxxxxx &amp; 0b10000000 == 0b00000000  =&gt;  !0b00000000 == true
0b1xxxxxxx &amp; 0b10000000 == 0b10000000  =&gt;  !0b10000000 == false