If you want to learn how to code for AVR, I would suggest that you do the following projects in order:
1 Light an LED (a visible one, not IR)
2 Flash an LED
3 Light an LED in response to a button press
4 Light an LED for 5 seconds following button press
5 Work a buzzer
6 Work a buzzer for 5 sec
7 Light an LED in response to your TSOP output.
8 Put all these together towards your final project.
Write your code one step at a time, not all at once.
Hope this helps
EDIT: just realised.... TSOP1738 will not respond to IR LED always on. It will only respond to IR LED pulsed at 38KHz. So step 6.5 will be to learn all about PWM