A federal judge yesterday gave final approval to the breakup of American Telephone & Telegraph Co. within the next 18 months, an unprecedented corporate reshuffling that will change dramatically the way the nation has communicated over the past 100 years.

The order signed by U.S. District Court Judge Harold H. Greene, splitting AT&T's local operating companies from the parent corporation, will provide consumers a new array of choices and prices in telephone service. For consumers able to shop around, this could mean far cheaper bills for telephone equipment and long distance calls.

There may also be many more headaches, though -- especially at first -- as Bell customers try to adjust to the fact that they will have to deal with many more companies than the familiar "Ma Bell." Also, the agreement guarantees higher local telephone bills, although they may not be as steep as first predicted when the divestiture plan was announced nine months ago.

Greene's action ends the eight-year battle between AT&T and the government, which had attacked AT&T's monopoly power. The judge dismissed the government's antitrust suit and signed a breakup plan agreed to by AT&T and the Reagan administration in January and including changes ordered by the judge two weeks ago.

"I don't think there is any doubt this is going to change the world," said communications attorney Thomas Casey. "The divestiture of the operating companies is rivaled only by two other events in the communications industry -- the invention of the telephone and the invention of the transistor."

Today, the simplest way to get local and long distance service and a choice of telephone equipment is to place an order with the local telephone company, although customers can buy equipment and subscribe to special long distance service now.

With the breakup of AT&T, it may take three or more calls to as many companies to arrange for service and equipment, communications analysts say.

"It has to be a different relation when customers won't be able to get everything they want to in one place," says Charles Marshall, an AT&T executive vice president who is doing much of the planning for the divestiture which the firm hopes can take place as early as Jan. 1, 1984.

Many details of how customers will buy and pay for telephone service still have to be worked out.

But as envisioned now, customers seeking new telephone service will have to call the local company to be hooked up to the local network. Although they may also be able to buy or lease a telephone from the local company after divestiture, they will likely want to shop around to check out the many different types of phones and prices that will be offered by the local company's growing number of competitors.

Among those competitors will be the newly constituted AT&T, which is expected to market telephone equipment aggressively.

The telephones in most households, which now are leased from local telephone companies, will belong to AT&T after divestiture. AT&T may decide to continue leasing them to the customers, or may try to sell them to their customers. But this decision too has not been made.

And to obtain long distance service, consumers probably will have to make special arrangements with the long distance company of their choice, such as AT&T, or its lower-cost competitors like MCI Communications Corp. or Southern Pacific Communications Co.

But in return, consumers who choose MCI, SPCC or another AT&T competitor may find it easier to use these systems because they will no longer be required to use a 12-digit access and identification number combination before placing a call. Instead, consumers probably will have to dial a single digit or, at most, three numbers to connect into a long distance network.

AT&T's long distance competitors will have to pay more to gain this direct access to the local network, communications analysts say, and that is certain to increase their customer charges.

As a result of all these changes, "it is going to be much more difficult for consumers to find out who's in charge of what," says Edward F. Burke, chairman of the Rhode Island Public Utility Commission who is president of the National Association of Regulatory Utility Commissioners.

The Bell System breakup also will guarantee higher local telephone bills, Burke says, but not be the two- or threefold increases that were predicted when the divestiture agreement was announced Jan. 8.

The reason is that Greene had ordered several changes that will dampen increases in local rates by increasing the revenues of local operating companies that will split off from AT&T.

Under the final divestiture plan signed yesterday, the Bell System will be dissolved into several companies. AT&T will spin off its 22 wholly owned local telephone companies which account for about two-thirds of its assets into seven separate regional companies.

These companies, which will retain the Bell System logo, will be responsible for local service. But they will also be able to sell telephone equipment if they wish, continue the profitable yellow page service and offer the new mobile radio service that is soon to be available nationwide. These companies will not be able to provide long distance service, however. Still, they will be required to treat AT&T and all its long distance competitors on equal terms in gaining access to the local network and customers.

AT&T, the parent company, will retain not only its name, but also the most lucrative parts of the Bell System: the equipment manufacturing subsidary, Western Electric; the long distance division, and the research and development arm, Bell Telephone Laboratories.

The divestiture plan will permit this newly formed company to enter any area of business it wants to by lifting the conditions of a previous antitrust settlement that had barred AT&T from offering any unregulated, non-telephone-related service, such as data processing.

But, under orders from Greene, this company will be barred for at least seven years from entering the electronic publishing business, sending news, financial and sports data and a host of other information to consumers on their home or office video screens.

For AT&T investors, divestiture will mean a dramatic change in the steady blue chip stock they bought for guaranteed growth and steady dividends. Last year, for example, AT&T paid $5.50 in dividends for each share. Instead of holding stock in one company, investors will be given shares in eight companies -- the parent AT&T and the divested local companies which will be divided into seven regional companies.

Winston E. Himsworth, financial analyst for Lehman Brothers Kuhn Loeb, predicts that investors "may lose a little of their value in the operating company stocks, but this will more than be offset in the new opportunities present for AT&T." Yet, he notes, "There will be greater risks with AT&T stock. But along with the risks, there will also be greater potential for return."