IR decoding

I am trying to write a code to decode an IR signal from a remote control. I came across this command but I did not understand what does it do ?

#define IRpin_PIN PIND
#define IRpin 2

while (IRpin_PIN & _BV(IRpin))

{

}

Why do you need to understand it? The great thing about using libraries is that you don't need to understand how they actually work.

The _BV macro shifts a 1 by the specified number of positions. That creates a mask that is applied to a port. The result is that only data from one pin on the port (a collection of pins) gets past the filter. That is the data of interest.

Thanks for the reply.