I know that both TCP and UDP are built on top of IP, and I know the differences between TCP & UDP, but I'm confused about what exactly "raw ip" is. Would it be fair to say that TCP & UDP both implement IP, but that IP in and of itself isn't capable of transferring data? Or is IP some very low level form of communication, which is further abstracted by TCP and UDP?
Layer 3 is in charge of end to end delivery. Its sole function is adding whatever is necessary to a packet to get a packet from one host to another.
Layer 4 is in charge of service-to-service delivery. Its sole function is to segregate data streams. Your computer can have multiple programs running, each which sends/receives bits on to the wire. IE: You could have multiple browser tabs running, streaming internet radio, running a download, running some legal torrents, using a chat application, etc. All of these receive 1s and 0s from the wire, and Layer 4 segregates each data streams to the unique application that needs them. Here is an illustration:
IP is unable to deliver a packet to the correct service/application. And TCP/UDP is unable to deliver a packet from one end of the internet to the other.
Both TCP and IP work together to enable them both to achieve the "end-goal" of Internet communication.
Data that needs to get from one host to another is generated by the upper layers of the OSI model.
This data is passed down to L4 which will add the information necessary to deliver the data from service to service, like a TCP header with a Source and Destination Port. The Data and the L4 header is now referred to as a segment.
Then the Segment will be passed to L3 which will add the information necessary to deliver the segment from end to end, like an IP header with a Source an Destination IP address. The L3 header and the segment can now be referred to as a Packet.
This process is known as Encapsulation and De-encapsulation (or sometimes decapsulation). Here is an animation of how it works:
IP can transmit data just fine, the problem is what happens when that data gets to the other end. The only identification information is the IP addresses of the hosts and a protocol number. Neither of which provide any way to distinguish what socket the data is for.
It is possible for programs to use IP directly through what are known as "raw sockets" but the lack of a proper mechanism for deciding which socket to send data to raises security and performance concerns (the kernel has to send the data to all raw sockets for a given protocol number). For this reason the ability to open "raw sockets" is usually restricted to root (or your platform's equivilent).
UDP is a fairly minimal layer over IP. It adds port numbers to identify what socket the data is for and a checksum (to reject corrupt packets). The application remains responsible for dealing with lost packets, controlling congestion and splitting the data into appropriate sized packets.
TCP is a more complex protocol that in addition to providing port numbers and checksums splits byte-streams into packets, reassembles then at their destination and provides congestion control and recovery features.
IP is an OSI layer-3 protocol, while TCP and UDP are OSI layer-4 protocols. As a layer-3 protocol, IP can carry many different layer-4 protocols. TCP and UDP are probably the most common, but they are not the only ones. Layer-4 protocols are what applications use as their end-to-end connections. IP transports layer-4 protocols from network to network (host-to-host). Layer-2 protocols, like ethernet, transport layer-3 protocols on a LAN.
You should research the OSI model, but realize that it is a conceptual model, and the real world often doesn't exactly match.