As @slm has already written, a TUN interface is a software loopback that emulates a network interface the same as a TAP interface. In practical terms, a TUN interface is the emulation of a layer 3 interface. That is, it is a network layer emulation device that can tunnel data packets of varied nature, be it raw TCP, UDP, SCTP or encapsulated packets such as PPP, PPTP, AH/IPSEC, whatever. On the other hand, a TAP interface is the emulation of a layer 2 interface, that is it is a data link emulation device that can work as a raw ethernet, arcnet, token ring, etc.
This has different practical implications. For example when designing a firewall, if you want to create a NATed internal network with non-routable addresses, you would use TUN interfaces to create your filtering bridge. If you have a set of public IP addresses that you can assign to internal hosts but still want to firewall all traffic you would use TAP interfaces to emulate an ethernet bridge on which to filter the data packets. This, btw, is basis of what is called a "transparent firewall".