Manipulating pins (SD Card)

This line:-
#define configure_pin_mosi() DDRB |= (1 << DDB3)

is saying that the pin mosi (serial in) is in data port B at a bit position given by the variable DDB3, which probably equates to bit 3. So port B bit 3 is the serial in pin labeled DI (data in) on the diagram.
Similarly CS is chip select which is select card in the definitions. DO is data out or miso.

But as you say:-

that the diagram is not related to the Library

So I don't know why you want to know how they are related?