You can download the hex machine code from the Arduino by using an ISP programmer, like this one:

A command like this could be used to read the flash memory and save it into myfile.hex
:
avrdude -c avrisp -p m328p -U flash:r:myfile.hex:i
However be warned that this file will look like this:
:100000000C945C000C946E000C946E000C946E00CA
:100010000C946E000C946E000C946E000C946E00A8
:100020000C946E000C946E000C946E000C946E0098
:100030000C946E000C946E000C946E000C946E0088
:100040000C9488000C946E000C946E000C946E005E
:100050000C946E000C946E000C946E000C946E0068
:100060000C946E000C946E00000000080002010069
:100070000003040700000000000000000102040863
:100080001020408001020408102001020408102002
:10009000040404040404040402020202020203032E
:1000A0000303030300000000250028002B000000CC
:1000B0000000240027002A0011241FBECFEFD8E043
:1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC
:1000D000B207E1F70E94F1010C9401020C940000B8
As you can see, you haven't really got "the program" back.
As Mikael Patel points out, you can at least turn it into assembler by doing this:
avr-objdump -j .sec1 -d -m avr5 myfile.hex
However the output is still not C code like you see in the IDE:
d4: 0e 94 f1 01 call 0x3e2 ; 0x3e2
d8: 0c 94 01 02 jmp 0x402 ; 0x402
dc: 0c 94 00 00 jmp 0 ; 0x0
e0: 61 e0 ldi r22, 0x01 ; 1
e2: 8d e0 ldi r24, 0x0D ; 13
e4: 0c 94 81 01 jmp 0x302 ; 0x302
e8: 61 e0 ldi r22, 0x01 ; 1
ea: 8d e0 ldi r24, 0x0D ; 13
ec: 0e 94 ba 01 call 0x374 ; 0x374
f0: 68 ee ldi r22, 0xE8 ; 232
f2: 73 e0 ldi r23, 0x03 ; 3
f4: 80 e0 ldi r24, 0x00 ; 0
f6: 90 e0 ldi r25, 0x00 ; 0
f8: 0e 94 f5 00 call 0x1ea ; 0x1ea
fc: 60 e0 ldi r22, 0x00 ; 0
fe: 8d e0 ldi r24, 0x0D ; 13
100: 0e 94 ba 01 call 0x374 ; 0x374
104: 68 ee ldi r22, 0xE8 ; 232
106: 73 e0 ldi r23, 0x03 ; 3
108: 80 e0 ldi r24, 0x00 ; 0
10a: 90 e0 ldi r25, 0x00 ; 0
10c: 0c 94 f5 00 jmp 0x1ea ; 0x1ea
Unless you are an assembler expert, making sense of that would be pretty hard, and the time taken to do it would be better spent simply rewriting the code from scratch.