I will kill you. Because you now have one of my players begging me to answer your question because she doesn't know how it works. She's silly like that. I'm going to be a little more detailed in the interest of a thorough answer.
When you are defending against a melee attack, it works as follows (SR4A, pg. 156 - 157):
You can block, dodge, or parry the attack.
If you block, you roll Unarmed Combat + Reaction opposing the attacker's roll.
If you dodge, you roll Dodge + Reaction opposing the attacker's roll.
If you parry, you roll the weapon skill for the weapon you're wielding (blades or clubs) + Reaction opposing the attacker's roll.
Obviously, you want to use the one you're most skilled in, and the one that you have an available option for (you can't parry without something to parry the blow).
When you are defending against a ranged attack, it works as follows (SR4A, pg. 153):
You roll Reaction opposing the attacker's roll.
On your action, or if you have not yet acted, in reaction to an attack (as an interrupt action, in lieu of your action that initiative pass), you may declare Full Defense (SR4A, pg. 160). This works as follows:
* You may declare Full Dodge, adding your dodge skill to ranged defense or melee dodge.
* You may declare Full Parry, rolling (melee combat skill x 2) + Reaction against melee attacks.
* You may declare Gymnastics Dodge, adding your gymnastics skill to ranged defense or melee dodge.
As always, there are a ton of modifiers that can apply, see Defending in Combat, SR4A, pg. 159.
Wait, that's right, you've got the straight SR4 book. . .
SR4A, pg. 156 - 157 == SR4, pg. 147
SR4A, pg. 153 == SR4, pg. 142
SR4A, pg. 160 == SR4, pg. 151
SR4A, pg. 159 == SR4, pg. 150