(Fortune Magazine) -- Carol Bartz wasn't interested when Yahoo co-founder Jerry Yang first approached her about rescuing the company he'd created at Stanford University 15 years ago. As she drove to his home in Los Altos Hills one day last December, she was prepared to be polite and maybe offer some advice. Bartz, who had retired in 2006 from design-software maker Autodesk, didn't need a new gig, and she certainly wasn't looking to play savior to a company she figured needed a CEO with media-industry chops - not her specialty.

Out of respect for Yang, though, she found herself in his living room, asking him to draw her an organizational chart. "It was like a Catholic school kid diagramming a sentence," she later told business partners. Lines crisscrossed everywhere, with no clear system of accountability. By the time he finished, the hooks were in. "I got it," she told Yang. "What you need is a manager."

That's exactly what Yahoo (YHOO, Fortune 500) got when it hired Bartz, 60, as CEO in January. She is likable yet hard-charging, given to salty language, and always brutally candid. (In March she told a questioner at a Morgan Stanley conference that she uses Google's online maps because they're better than Yahoo's.) Bartz is also a known quantity in Silicon Valley circles: a seasoned executive who understands technology, is skeptical of the kinds of juvenile-sounding job titles that proliferate at Yahoo (Yang remains Chief Yahoo, for example), and thrives under pressure.

Perhaps most important to the Yahoo board, she has shown she can jump-start ailing companies. During her 14-year watch at Autodesk (ADSK), she delivered compounded annual sales growth of 13%, and the stock price climbed more than eightfold.

Bartz's celebrated management skills are going to be put to the test: Once the wunderkind of the web, Yahoo has floundered as the likes of Google, Apple (AAPL, Fortune 500), Facebook, and Twitter have redefined online communication and commerce - and have grabbed much of the buzz along the way. Marketers have stopped pouring money into Yahoo in favor of Google's more pointed, search-driven ad platform as well as a passel of specialty sites such as Glam.com and Break.com. Last year Yahoo's revenue rose an anemic 3% to $7.2 billion; by contrast the company increased annual sales 47% in 2005. Many investors and analysts believe that Yahoo, despite spurning a $45 billion buyout bid from Microsoft (MSFT, Fortune 500) in 2008, ultimately will be acquired or stripped of its most valuable parts.

Bad as things are, though, Yahoo remains one of the most popular online destinations, and users spend more time on Yahoo sites than on any other major web property, including Google (GOOG, Fortune 500). Bartz has the opportunity to harness that popularity to get the business growing again. But first she'll have to come up with a strong vision for Yahoo, a mission that seems at odds with her reputation as a taskmaster and disciplinarian. Is Yahoo a media company, selling advertisers access to its 562 million worldwide unique visitors? Is it a technology conglomerate that builds and delivers applications and services over the web? Or is it perhaps something else altogether?

There's little question that Bartz can make tough, unsentimental choices about which assets and people Yahoo should jettison. (She's already well on her way to fixing that messy org chart and reining in its unstructured culture.) But now she must do something much harder: She needs to figure out and explain what she wants Yahoo to be.

***

None of this would be Bartz's problem if she had simply stayed retired. After stepping down from the Autodesk CEO job in 2006, she busied herself volunteering with charities, vacationing in Hawaii, tending her garden in Atherton, Calif., polishing her golf game, and serving on the boards of Autodesk, Cisco, Intel, and NetApp. (She's since left the Autodesk and Intel boards.) The first year, she told friends, was great. The second, good. By late 2008 - well, the retirement thing was getting old. Bartz missed the thrill, and even the stress, of daily business life.

Though she comes off casual, even folksy, in conversation, she has admitted to associates that she's a bit of a crisis junkie. Bill Coleman, a Silicon Valley executive who worked with Bartz two decades ago, recalls taking a trip to Shanghai in November with Bartz and her husband, Bill Marr. (Bartz and Marr have three children, all adults.) "When my wife asked her how she was doing with the transition, she was like, 'You know, this is much harder than I thought. I like golf - I don't love golf. I like Hawaii - I don't love Hawaii.' You could just tell she was ready for something."

Carol Ann Bartz was born in the summer of 1948 in Winona, Minn., a river town on the Wisconsin border. Bartz's mother died when she was 8, and her father, a mill worker, disciplined his kids with a belt. When she was 12, she and her younger brother moved to Wisconsin to live with their maternal grandmother. In high school Bartz was a drum majorette and a science and math geek, and went on to earn a computer science degree at the University of Wisconsin. She worked her way through college as a cocktail waitress at the Hoffman House supper club, donning a uniform that, she has recalled several times since, included a red miniskirt with black fishnet stockings.

The determination that sprang from those humble beginnings stayed with Bartz as she began her career in the early 1970s, a time when corporate America often treated women with outright hostility. Undeterred, she did programming, sales, and marketing at 3M and Digital Equipment Corp., and eventually moved into upper management at Sun Microsystems, a scrappy young company she joined when it had about 100 employees and $9 million in revenue. Her co-workers quickly recognized her as someone with exacting standards - and a sharp tongue.

Venture capitalist Ray Rothrock recalls being on the receiving end of one such lashing when he was a 28-year-old business development manager at Sun. It was the mid-'80s, long before Silicon Valley's casual culture had solidified, and Rothrock had come to work without a tie. Bartz spotted Rothrock's attire and lit into him. "Ray Rothrock!" she snapped, loud enough for the entire department to hear over their cubicles. "You go home, and you put on your coat and your tie. I don't ever want to see you back here again not prepared to meet any customer who walks in that door." It was embarrassing, and effective - from that day forward, he says, everyone came prepared to do business at a moment's notice.