Round-the-world fares do exist.
Most airline alliances and occasionally single airlines offer around the world fares.
It can be very cost effective, especially for premium class (business and first class fares).
There are limits on all of them, usually they prevent backtracking across a continent, a limited number of segments, and only visiting each continent once (once you leave you don't go back).
Flyertalk is a forum with a lot of trip reports done on RTW fares (check the trip reports forum).
In response to your comment, usually if you arrive at one airport and depart from another then that counts as an overland segment and counts towards your ticket usage.
For example, if you flew from New York to Berlin, took the train to Madrid, and then flew out from Madrid to Cairo, three segments would be used:
- New York - Berlin
- Berlin - Madrid (overland segment)
- Madrid - Cairo
It doesn't matter if you fly or not, it still takes away from your overall segment limit. A segment refers to one specific flight.