IP addresses
Data packets on the Internet (or some local area network in say, your office or home) can be of several types. These are the "protocols" and there is one or more RequestForComments (adopted as an Internet Standard by the IETF; if not adopted, RFCs are merely proposals) describing each one. In many ways, the most important of these is Internet Protocol, which is the underlying layer for several other protocols. Of these, the most important is probably Transmission Control Protocol. When both are in use, your packets are TCP data being carried by IP packets. Hence "TCP/IP".
Among the things the Internet Protocol does is to provide an addressing scheme for Internet nodes (ie, computers -- mostly). Each packet has a source IP address, and a destination IP address. For IPv4 these are 32 bit numbers and usually written (for ease of human reading) as 4 numbers separated by '.'. This is the "dotted quad" form for IPv4: 192.10.35.2, for instance.
The way these addresses were originally assigned was inefficient in that large numbers of them went unused, but were already parceled out. There are only 256 possible IP addresses if the trailing 3 numbers are assignable to nodes (ie, computers) within some organization. For instance, Harvard Univerity was assigned all the address in one of those 256 blocks as it was one of the earliest participants in the IP addressing scheme. But it doesn't have xxx.255.255.255 (2^24) possible nodes to assign an address to; some of its reserved addresses go unused. There are 256.256 (2^16, or about 65000) assignable blocks at the next lowest IP address level as things were originally laid out, and 256.256.256 (2^24) assignable address blocks at the lowest block level. Each of these blocks has 256 different IP addresses, and the next highest 256.256 (2^16) different IP addresses, and the highest level 256.256.256 (2^24) IP addresses. Actually there are a few reserved addresses (loopback, multicast, private addressses, etc), so the figures I've given here are slightly too large, but you'll be alright even with this slight simplification.
Routers understand these addresses and keep tables of the address blocks they know about and what computer knows more than they about each of these. So, depending on the address within a data packet, a router will send the packet hither or yon to get it to its destination.
With the growth of the Internet, available IPv4 address blocks and addresses ran out (or threatened to). There were several responses to this dire threat.
1) A new IP specification was developed and adopted as an Internet Standard. This is IPv6, uses 64-bit IP addresses, and has enough addresses to assign a unique one to almost everything on Earth, from computers to toasters to shoes to iPods to portable radios and more or less everything else. But lots of software has to understand about IPv6 addresses, and they have hardly all changed over yet. Lots of computers and other IPv4 things which will need to be changed, and so the IPv6 folks provided for some simultaneous operating of both IPv6 and IPv4. IPv6 is not widely adopted as yet. Soon, Real Soon Now...
2) Another dodge was to reuse IPv4 addresses. The Distributed Host Configuration Protocol (DHCP) was developed and has long been an Internet Standard. A block of IPv4 addresses assigned to, say, an Internet Service Provider (eg, Earthlink, your local DSL provider, your local cable Internet provider, Sam's Pretty Good Internet Service, ...) is reused as needed, thereby making one IPv4 address go farther. The trick is for the client (your computer, say) to request an IPv4 address from the ISP's DHCP server. The server looks into its pool of currently available addresses and loans your computer one of them. For a while (hours, or days at most). It also sets up the servers address tables so that, until the 'lease' expires, all the traffic for that IP address goes to your computer. When the lease expires, or you end your Internet session, the relevant table entries are cleared, and the address becomes available for use by someone else.
3) Next for IPv4 is the Classless Internet Domain Routing standard (CIDR). Rather than assign IPv4 addresses by blocks with sizes divisible by 8, this Internet Standard relaxes the "all blocks have 8 or 16 or 24 bits" rule. If your organization needs only 512 IP addresses, the last number in the dotted quad format should have 9 bits, not 8. It's done with a new protocol which tells routers and such things that only the first 23 bits are the block part of this IP address. For humans, this is written by appending "/9" to the end of the IP address. Fewer assigned, but unused, IPv4 addresses. This is good.
4) Last, yet another Internet Standard. Some otherwise legal addresse are not allowed onto the Internet. Defective routers sometimes pass packets along wven if they have these addresses, but they shouldn't. These are non-routable IP addresses. There is one top level (ie, Class A) non-routable IP address block (2^24 possible nodes in this block), one class B non-routable block (2^16 possible nodes in this block), and one Class C non-routable block (256 possible nodes in this block). These are private addresses, or masqueradeable addresses. In order to work with the actual Internet, each private node address must be translated to some Internet routable address on the way out of the private network, and translated back for packets on the way into the private network. The private addresses are masqueraded as far as the rest of the Internet can tell. When this is configured properly and works, there are security advantages, for a hostile Internet user can't send any packets to your actual address because they can't travel over the Internet. The disadvantage of this technique is that the Network Address Translation (or IP Masquerade) must be properly set up or Internet communication will be impossible.
==========
Domain Names
For many reasons, humans don't much like the IP addresses the computers on the Internet use. For commercial reasons, toiletvalvesRus wants to have an Internet name customers can remember. Something like toiletvalvesRus.com, maybe. And Donald Trump certainly wants everyone to know its him. donaldtrump.net is much better for his ego than 234.56.7.2
The solution is the Domain Name System, which is an Internet Standard. The simplest account of it assumes that there is one computer per IP address and that the human readable name applies to only one computer. Your machine must have a pointer as part of its Internet configuration which contains the IP address of another computer which will provide DNS service to your machine. Optionally, there will be a secondary DNS server as well, in case the first fails or goes off the Internet for some reason (wild workmen with trenching machines come to mind).
The DNS server is a software program (often called BIND which was first written at UC Berkeley as part of an early BSD Unix release) which maintains a table of IP addresses it knows about, and for each, the human readable name for it. When you enter a domain name (in your browser, perhaps), your computer looks up the IP address of the primary DNS server and asks it about the IP address for this domain name. If that DNS server doesn't know, it asks its own primary DNS server... And so on to the group of root DNS servers for the entire Internet. Eventually, if the domain name is a valid one (ie, properly registered with the proper Internet registration authority) the IP address will be found and returned to your computer.
Domain names can expire (didn't pay the registration renewal fee, bunky??) or be cancelled (malicious script kiddies think this is a hoot, will you??) and so on. Wehn they are, no one will be able to find you by that domain name. The IP address should continue to work unless it comes from the same registrar as the now expired domain name.
There is a short list of the highest level of domain names parts (the .com, .net, .gov, etc stuff), and there are proposals to add more. There's even an appeal procedure in cases of claimed 'domain name squatting'. Joe Obnoxious registers the domain name, bambooskis.com, just before your innovative ski company thinks to try. It used to be that your could buy your desired domain name from such a squatter for a sufficiently large fee. Nowadays, after a long period of squatter extortion, it's possible to appeal to an official Internet name policing agency which has the power to reassign such names if it can be convinced the current holder is a squatter.
And there are various tricky ways to make several computers share a single domain name (useful if you're Google and don't want your whole service to depend on a single machine somewhere) or to supply a requested page from the least busy of several machines in any of several places. Improves response time as seen by the user. Usually.
And there are ways to change the prefix of a URL for a domain name (ie, from http//:www.bambooskis.com to ftp//:www.bambooskis.com) to indicate which protocol you are requesting from the server. They are rather complex and go beyond your question, so I'll skip them here.
Hope all this helps some.