How to receive data via SPI

Sending is easy, but how do i receive? I will have other devices sharing the bus, so a dedicated line is needed.
Question is, what if I am in the middle of some other transmission?

You receive at the same time you send. Every time the clock pin goes active the Slave grabs the data on the MOSI line and shifts it into a shift register while the Master grabs the data from the MISO line and shifts it into a shift register. After 8 clocks the SPI.transfer() returns the data that was received during that send.

Typically the received data will lag behind the sent command by at least a byte since the Slave won't usually know what the Master wants until it has received an entire command. The Master continues to send dummy data (typically 0) to clock in the data from the Slave:

digitalWrite(SlaveSelectPin, LOW);  // Select the Slave device
SPI.transfer(COMMAND);
byte returnedValue = SPI.transfer(0);

johnwasser:
You receive at the same time you send. Every time the clock pin goes active the Slave grabs the data on the MOSI line and shifts it into a shift register while the Master grabs the data from the MISO line and shifts it into a shift register. After 8 clocks the SPI.transfer() returns the data that was received during that send.

But wont I have to set an interrupt on the SS line to tell the slave the master wishers to transfer data?
I mean the slave could be doing something else. Or is this internally taken care by hardware as in DMA?

casemod:

johnwasser:
You receive at the same time you send. Every time the clock pin goes active the Slave grabs the data on the MOSI line and shifts it into a shift register while the Master grabs the data from the MISO line and shifts it into a shift register. After 8 clocks the SPI.transfer() returns the data that was received during that send.

But wont I have to set an interrupt on the SS line to tell the slave the master wishers to transfer data?
I mean the slave could be doing something else. Or is this internally taken care by hardware as in DMA?

If you want to use an Arduino as a SPI Slave you can learn from this example:

It uses the SPI interrupt which signals the arrival of a byte of data.

Yes, you can have the slave send a signal to the master that indicates there is data to send.
Once received, the master can then command a read sequence as John showed in his first reply.
Whether that signal is handled as an interrupt, or is a polled input by the master, the slave still cannot send until the master starts the transfer by taking the slaveSelectPin low and then doing the SPI.transfer( ) commands.