When Republican Sen. Strom Thurmond stopped at the registration booth on senior citizens' day at the state fair he looked with interest at a sign offering a prize to the oldest visitor.

"We've already got one man who says he's 108," the hostess told him.

"I can't win that contest," Thurmond said.

It may be the only race the 75-year-old senator doesn't capture this year. His challenger is Democrat Charles D. (Pug) Ravenel, 40, a dynamic and progressive businessman who stirred the state with a dramatic 1974 gubernatorial bid that was foiled only by a last-minute court ruling that he failed to meet a residency requirement.

Thurmond vs. Ravenel has been billed as a classic Old South vs. New South battle of the generations. The trouble is that the wily Thurmond refuses to be pigeonholed as "old" anything.

It goes beyond his well-publicized physical fitness regimen or the four children sired since 1968, when widower Thurmond married Nancy Moore, a former Miss South Carolina who is 44 years his junior.

On the same day he made his "senior citizens" visit, he went to a birthday party for 6-year-old Strom Junior at a firehouse here and won front-page pictures across the state by delightedly sliding down the fire pole (no shrinking violet or stickler on dignity, Thurmond made the slide three times to be sure photographers had the picture he wanted).

More pertinent, the longtime segregationist who walked out of the 1948 Democratic National Convention to run as a State's Rights presidential candidate, now bids openly for the support of black voters who comprise more than a quarter of the electorate.

Thurmond beamed when a large black woman rushed up at the state fair and said, "Senator, I'm Darley Cochran from Clarendon County. You sent me that newsletter saying to let you know if you could help, and I want to tell you, you've helped."

Cochran told a reporter that Thurmond's office - which has had blacks on the staff for the last eight years and a sewage treatment plant in her predominantly black community. Asked if she planned to vote for the man who quit the Democratic Party to protest its civil rights policies and in 1964 joined what he was careful to call "the Goldwater Republican party," she said, "I'm for the man that's getting the job done."

With that kind of endorsement added to the near-solid backing of the business community veterans' groups and those for whom he has done favors in his 24 years in the Senate and a pervious four years as govenor, Thurmond is a formidable rival for anyone to face this Nov. 7. Conservatives from around the country have contributed two-thirds of his $15 million campaign chest.

But Ravenel is no slouch. The Charleston native came home in 1973 with a Harvard education and seven years as a partner in a Wall Street investment firm. In 1974, the political unknown ran for governor, making a full-scale assault on the cozy, comfortable business-courthouse establishment, which he blamed for keeping South Carolina at the bottom in education, health and social services statistics. In the Watergate year, Ravenels fervent campaigning and antipolitician image won him a devoted following in what he calls "the coalition of the disaffected."

He won the Democratic nomination for governor and appeared a cinch for election, when the state supreme court reversed an earlier decision and said he failed the residency requirement.

This year, with like-minded progressives ready to run for governor, Ravenel chose to challenge Thurmond. His campaign has tried to unite his earlier reform-populist themes with a rather conservative approach to some national fiscal issues.For example, Ravenel urges a two-year freeze on federal spending to eliminate the budget deficit.

But he has backed President Carter on three contreversial issues - the Panama Canal treaties and the vetoes of the military procurement and public works bills - on which Thurmond, to the applause of most South Carolinians, took the opposite stand.

Most damaging to his campaign, Ravenel came out early for the labor law revision bill, cutting himself off from the business establishment, which views that measure as a prelude to unionization of the South. The heat on that issue got so intense that Ravenel took out large ads, stressing his support of the right-to-work law and his opposition to the common site picketing bill and provision of food stamps to strikers. That, in turn, aggravated the unions and - while their contributions are flowing again now - there was a slowdown in his television campaign during a critical period.

Ravenel has also been hurt by hard feelings among organization Democrats about his 1974 campaign, particularly his refusal to give full support to ex-Rep. William Jennings Bryan Dorn. Dorn lost to Ravenel in the Democratic runoff for governor, but became party nominee when Ravenel was bumped off the ballot. Ravenenl says he would have "destroyed my credibility" had he turned around and campaigned for Dorn, but the party blames him for losing the governorship to Republican James B. Edwards.

Thurmond has publicized the names of some 67 Democratic officials supporting his reelection and has made it easy for the courthouse Democrats to help him by announcing he will not campaign for any other Republicans.

The state's other senator, Democrat Ernest F. Hollings, is treating Ravenel with cool dislike and even Dick Riley, the Democratic gubernatorial candidate who shares many of Ravenel's views and seems sure to win, is keeping his distance.

Thurmond has been painting Ravenel as a carpetbagger from the North, describing him in campaign literature as a "liberal New York investment banker."

Despite these difficulties, Ravenel has taken the offensive in these final two weeks, pounding hard on Thurmond's refusal to debate and finding money for a series of effective half hour television shows.

With his own polls showing him 14 points behind (as compared to Thurmond polls showing twice that margin), Ravenel hopes to overcome the odds. His aim is to win more than 90 percent of the black vote in a healthy turnout and to take 40 percent of the white vote through a combination of traditional Democrats and younger whites who respond to his call for "a new generation of leadership."

To win the blacks, Ravenel has documented Thurmomd's long record of opposition to civil rights bills, saying "he has done more than any other politician in American history to hold down blacks."

Thurmond does not deny the record, but implies that it was all a long time ago. "When I was governor," he told a student questioner at the University of South Carolina Law School, "the laws aid the races should be separate. But now the law is different, customs are different, public opinion has changed and it's an entirely different situation.

In that appearance, Thurmond referred obliquely and briefly to his record 25-hour filibuster against one civil rights bill as "a long speech I made once." He dwelled, instead, on his support this year of a proposed constitutional amendment to give the District of Columbia voting representation in Congress and his endorsement of a black civil rights lawyer to be a federal judge.

Realistically, Thurmond strategists concede that, despite his support from several black mayors and church leaders and the good will he has won by his help to black colleges, he cannot do much more than double the 8 percent of the black vote he won last time.

But, as one Republican official said, "He's made his way with the black folks, and they're not mad at him any more. He's anesthetized them."

A low turnout in the black community - a real fear among Democrats - could kill Ravenel's chances.

As Harry S. Dent, former Thurmond aide and a Republican political strategist, put it, "Thurmond these last few years, instead of being the shrill negative voice, has been Mr. Deliveryman - for blacks as well as whites. The state has changed, but he's changed with it. He's an ideologue who ain't crazy."

And that is why Ravenel is finding this race so difficult.