A quote from:
http://en.wikipedia.org/wiki/TUN/TAP :
Packets sent by an operating system via a TUN/TAP device are delivered to a user-space program that attaches itself to the device. A user-space program may also pass packets into a TUN/TAP device. In this case TUN/TAP device delivers (or "injects") these packets to the operating system network stack thus emulating their reception from an external source.
This means as much as a virtual interface (layer 2 or 3, depending on tun/tap) delivering the packets to a userspace program.
In this case, openvpn is the userspace program which takes care of transmitting the packets to and from there destination.
Because we want some kind of encryption, openvpn uses the standard SSL/TLS for encrypting the content (which are the ip- or ethernet-frames). This means that the 2 layers are complimantairy to each-other:
- tun/tap for the packets on your virtual interface
- ssl/tls for encrypting the previous gathered content. And sending it out using the hardware-bound ip-address.
Analogue situation:
I'm sending you a letter and address the envelope correctly.
Inside the envelope there's an envelope (with letter included) with entire different ip-addresses on it. But the mailman never will see these as he only can read the outer envelope.