They are configuring timer1 by writing to the timer control registers (this is how the timer is controlled - Arduino provides wrappers to get tones and PWM, but this is the kind of thing they do under the hood).
Looks like they're setting the WGM that uses ICR1 as TOP, and setting the output compare at half of TOP, so it looks like 50% duty cycle... And the prescaler is set to 8x instead of the usual 64x
Looks like it also enables the timer overflow interrupt, so an ISR should be firing when the timer hits TOP... you should find an ISR elsewhere in that code.
The function of those registers is explained in detail in the Timer1 chapter of the datasheet - my interpretation of them was from memory, too ;-)
Or at least that's what it would do if the whole thing wasn't commented out...
WGM12 is a constant containing a bit location. Let’s say - 5 (I don’t know what it might be). Bit 5 of TCCR1B relates to WGM12.
Likewise, WGM13 and CS10 contain (say) 3 and 2.
The operator << is the bit shifting operator. So (1<<WGM12) is the value 0b000000001 bitshifted by 5 - 0b00100000. Likewise, (1 << WGM13) and (1 << CS10) might evaluate to 0b00001000 and 0b00000010.
The operator | is the bitwise or operator. ‘oring’ two numbers together results in a value where each bit is true if either corresponding bit is true. So, 0b00100000 | 0b00001000 | 0b00000100 is 0b00101100, which would be the bit pattern that needs to be put into TCCR1B. Note that if WGM12 (etc) is a constant, this expression is evaluated at compile-time: it’s no slower than saying TCCR1B = 0x2C. But by using symbolic constants, you don’t screw up the bit pattern in code and a person reading the code can understand what’s going on.
There are other things here that a C programmer will instantly recognise. (foo & 0xFF), for instance, means “use only the low byte of foo”, and (foo >> [nobbc]8)[/nobbc] means “use the high byte of foo” - assuming that foo is an unsigned 16-bit quantity.
Tells me that OCR1A and ICR1 are a pair of values with a high and a low byte. TIMER1_TOP goes into ICR1, and TIMER1_TOP/1 into OCR1A. Although the division by two could have been done with bitshifting, the person who wrote this is saying to me that OCR1A and ICR1 are numeric quantities, and that OCR1A needs to be numerically half ICR1.
Other common idioms are
foo |= (1<<bar); // set bit bar of foo
foo &= ~(1<<bar); // clear bit bar of foo
foo ^= (1<<bar); // toggle bit bar of foo