WARENTON, Va., is an ugly srtip of gas stations, fast-food outlets and motels, the courthouse where John Marshal first practiced law and the hotel where Wallis Warfield awaited one of her divorces, as well as the community of horses - the Gold Cup, the Labor Day Horse Show and polo.

Warrenton encompasses all of these and more - the oldtime businesses and the young people starting new ones, the corner where young blacks without jobs loiter, the drugstores where merchants, lawyers and workmen gather for lunch, rundown houses for the poor and new town houses for commuters and the mud, or dust, of a new sewer line.

It belongs to the 5,000 people who live in a small Southern town that happens to be less than 50 miles from a major Eastern city and is the seat of a county that contains vast Northern wealth. The Mellons, Harrimans, DuPonts and Chryslers all have estates outside the town.

Warrenton is not a town in crisis. Growth has been slow, an increase of about 1,500 in 17 years. Unemployment, officially, is under 4 per cent, local residents are proud of their schools and the tax and crime rates are low. It is a "typical" small town.

And it is a complex as any typical small town, changing too quickly or too slowly, friendly or cold, fair or prejudiced, depending on an individual's viewpoint.

From the perspective of Mayor J. Willard Lineweaver, Warrenton and surrounding Fauquier County are "a garden spot of the world."

Lineweaver, "Bill" to the stream of friends who wander in and out of Carter's Furniture Store on Main Street to talk about the weather or a pothole, moved to Fauquier in 1929 at the age of 7 when his father became superintendent on a horse farm owned by W. Averell Harriman's sister.

"We have the same problems big cities have - growth, drugs, drinking, a lot of old people on fixed incomes. Just because we're small, we're not immune," Lineweaver said recently.

"Keeping our young people is our biggest problem. It's just hard to offer them anything," he said. "And real estate is very expensive. Prices seem to be driven up every day. I don't know what you can do about that.

"But our problems are very minute in scale and this is a fine place to live."

Warrenton was settled in the 1760s and a courthouse and jail were built in 1790. The courthouse has burned and been rebuilt twice but the original jail, now a museum, still stands. Richard Henry Lee donated 71 acres around the courthouse and the town was laid out and incorporated in 1810.

The town grew atop a ridge and Main Street still the heart of the town, also was the main route from Washington to Charlottesville and points south. Trade flourished, scores of handsome homes were built, lawyers prospered on Culpeper Street next to the courthouse, the wealth of New York and other industrial centers moved into the depressed farming economy of the turn-of-the-century South and bought up the "Horse Country," similar in its limestone underpinnings to the Blue Grass country of Kentucky.

The automobile and the social changes triggered by World War II struck Warrenton as hard and as subtly as they did the rest of the nation.

The passenger trains stopped running; the railroad station closed; a bypass took traffic off Main Street; The Warren Green Hotel where Wallis Warfield (later the duchess of Windsor) waited out a divorce, declined; a section of town decayed, young people moved away.

The years 1959-60 were pivotal for Warrenton. The town annexed three square miles, which included the new shopping center that was opening at the north end of the bypass. The shopping center took the supermarkets and the large chain stores away from Main Street, leaving some vacant store fronts and a sense of antagonism between the two commercial districts.

And on Oct. 1, 1960, blacks sat down at a "white" lunch countre. They were served promptly, and for the first time that color line was broken.

Black and white leaders had met beforehand and met frequently throughout a period that in some similar southern towns brought violence. Warrenton desegragated its commercial facilities peacefully and the schools followed with some turmoil but no major disturbances.

What has happened since the 1960s is summed up by Fauquier Democrat managing editor John Eisenhard who, when asked about the growth and change, replied, "When I heard your question and thought about for awhile, my question was what growth, what changes.

What then is happening in a town where nothing is happening , where a visitor's parking violation results in a card on the windshield saying, "You are welcome in Warrenton any time," lists historical landmarks and asks that "when in Warrenton again, which we hope will be often, that you will assist us by carrying out our traffic laws?" No fine.

On a recent day, the shopping center was jammed, the stores near capacity and the lot full of cars. Hundreds of the cars belonged to commuters to the Washington area who meet in Warrenton and car pool to the city. A third of the county's work force now works outside the county and the figure has been rising steadily.

Two of Mayor Lineweaver's sons-in-law are among them, one trekking to the Justice Department and the other to Rosslyn for a Defense Department job.

They had family ties to the Warrenton area, as do many of the other "new" residents, and have decided to pay the price of as much as three hours a day in transit for a city salary and a small town or country lifestyle.

"A lot of people would like to get out of that rat race," said Lineweaver, "If they could find something local, even at less pay, they'd like to have it."

Julia Winfield is one of the newcomers, a Tennessean who worked for the Christian Science Monitor before marrying and moving to Warrenton with her husband who develops homes in Northern Virginia.

Winfield, like most of the wives among the young couples she has met, has a job. Hers is with the weekly newspaper. "All of us want to own our own homes, both parents work and we live beyond our means," she said.

If the trend toward commuting continues, these new residents may become the dominant force in the area, supplanting the present alliance between the old line business and professional community in Warrenton and the horse people who live outside.

The provide increased variety in the population, but their eventual influence may be time, not-wealthy residents on future growth, but more liberal in demand for services.

They also have several unintended effects - pushing prices and salaries toward the metropolitan level. The result is that housing costs go up, the chance of attracting the sort of light industry that community leaders want is diminished and additional pressure is put on the poor.

The impact on the black community has been substantial. Perhaps the best known black man among whites is Charles Madison, an 85-year-old barber whose family has owned its Main Street shop since the turn of the century.

Madison, even in a town like Warrenton, has lost business to the hair stylists but he still retains a core of white customers who come in from around the county.

Felton L. Worrell, who came to the Warrenton area in 1963 to teach in the high school and now runs the federally funded job program, said, "The black professionals here are not natives. Once a black finishes high school he has to leave."

Worrell, the first black to run for Town Council (non has been elected), said: "There has not been much change or growth because that is what the establishment wanted. Initially I was in opposition to that, but I see some merit now. This is a place to get away from the bustle of the city. Keeping it that way benefits us all. It's good place to raise children."

Worrell said that blacks have advanced, with one principal and three assistant principals in the Fauquier school system and a number of recent graduates in college on scholarships.

But there are two age groups of blacks that he fears are beyond help. The first he describes as "the spent generation," the older men who never had opportunity, spent their lives at menial tasks and in many cases found liquor the only pleasure they could afford.

The second are the young men who bore the brunt of the turmoil of the 1960s - the integration battles and the Vietnam war. They returned from service angry and without jobs and often can be found at the corner of Main and Second Streets before it dives sharply downward past the Hill Top Cafe and the Black and Gold Inn.

Worrell and Lineweaver, apporaching the town's problems from opposite directions, have come to many of the same conclusions. Both want enough growth to provide better jobs and housing without sacrificing the town's gentle quality of life. And both cite the proximity to Washington's cultural and night life as one of Warrenton's great advantages.

"If you want to get back into the mainstream of what is actually happening, you can be there in an hour," Lineweaver said.

On a recent day, Main Street was lined with cars and nearly every passerby nodded or spoke in greeting. The mayor, posing for a photograph near the courthouse, go razzed by a succession of men and observed that one change in Warrenton was that he now knew only three-quarters of the people instead of all them.

"Maybe a newcomer isn't accepted into the community as fast as they would be in come areas, but it is a friendly town. It might not be as quick to take them in socially but that by no means means that people don't speak," the mayor said. "I hope we'll be able to keep that."

Other residents talked of the courtesy combined with social stratification that oftens characterizes Southern towns.

But Robyn Payne, 24, one of about 120 Paynes in the county and the proprietress a new gourmet cookware and glass shop called the Town Duck, recalls her changing attitude toward her community.

"When I went to high school here the biggest thing was 'we can't wait to leave, we can't wait to leave.' We left," she said. "And then we all came back."