How do I replace this switch with a dimmer?
The loop in the black wire is normal when electricians are running a hot wire from device to device. It saves them time and is really safer since it involves fewer wire nuts.

The orange wire is the wire that is going to the light. The power enters the switch where the black wire is looped over the screw, and exits to the light through the orange wire.

Yes, attach the green wire to the green screw. But, you need to wire the blacks from the switch differently. One switch black is for the incoming power, and the other is for the exiting power. So, one needs to be connected to the same black that is connected to the old switch; and one needs to be connected to the orange. 

I would, with the power off at the circuit breaker panel, and after testing to make sure the black at the switch is not hot, cut the existing black to form two separate wires and strip the ends appropriately. Then I would connect one of the black wires from the new switch to these two wires with a wire nut.  After that, connect the other black for the new switch to the orange with a wire nut. That should do it, and your dimmer should now work. Good luck, and be careful!

PS: I personally use a Fluke 1AC-A1-II Volt-Alert AC Non-Contact Voltage Tester to verify or locate hot wires and love it. You might want to check it out for the future. Its inexpensive too. Note: I have no personal connection to Fluke; I just think good products like this are worth spreading the word about.