The Black Widow is a freelance agent.
Sometimes. Sometimes she becomes closely affiliated with an organization and other times she heads out on her own and do not even try to get in her way.
The woman is a beautiful collection of contradictions and confusion but considering how long she has been active, that is not unexpected. Being a product of the comic book / graphic novel world and its penchant to "retcon", that is also not surprising. For those not in the know, a retcon is a "retroactive continuity" which is comic-speak for "forget whatever we told you before, this is the new truth".
When a new writer/artist comes along and wants to use the character and gets the okay, it often means a new twist to the storyline. In the case of the Black Widow, the twisting has been impressive.
First, what is her name? Natasha Romanova is the most comely agreed upon name. Natasha Romanoff is an alias used for a while. Natalya Romanova is another one. And Natasha Romanov (minus the 'a') is around as well. Considering she is a secret agent, though, having different names is not uncommon.
Second, what is her origin? At first we are told that she is of Russian birth (and no amount of retcon-ing seems to change that). But which Russia? The Soviet Union was her homeland for much of her early adventures so we should begin there.
The Soviets had a Black Widow program where they trained beautiful, feisty, kick-butt ladies to become deadly weapons to be thrown at an adversary and take him down. It had the straight-forward name of the "Red Room" but while the title is simple, the training was not. It was intense and constant and no one graduated who was extremely good at a very large number of things. Natasha (we will use that from now own) became the very best and earned the sobriquet.
The first person that we read about her going after was Tony Stark. This was in his early days as Iron Man, before the world knew the two were the same. She was sent, along with her cohort, Boris, to destroy Stark and a "traitor", the Crimson Dynamo. (Boris and Natasha - this is half a decade after a similarly named pair plagued a talking moose named Bullwinkle).
She goes up against Stark/Iron Man a couple of times before hooking up with another partner-in-crime, a newbie named Hawkeye. Hawkeye wanted to make a name for himself and Natasha needed an able body so she entices him and he becomes her stooge. Over time, Hawkeye reforms and joins the good guys but Natasha remains an agent of the Reds and continues to plague the West with her plots, usually now including costumed villains enthralled with her charms.
A couple of years pass and the Black Widow shows up again but now she has reformed as well. Using her renewed friendship with Avenger member Hawkeye (now the warm feelings are for real) she seeks to become one of the good guys but suspicions are hard to subdue. She will eventually get her shot.
So, the Avengers add an extremely athletic and resourceful non-powered female member to their team and for a while she fit right in. But Natasha is very much a wandering soul and soon the desire to head to other places took hold and she left the Avengers (becoming a reserve member, of course, which lets her keep her passkey). Her farewell with Hawkeye, now Goliath, is rather harsh as to save his heart, she felt she had to break it. (They will remain friends.)
Now comes the days as a true freelancer. People call. Jobs come and go. She gets bored and then really busy and then bored again. She runs into numerous bad guys which she pounds on and a few good guys which she pounds on and generally stays active.
She becomes for a while the (really) close companion of Daredevil. At another time she takes up with the Olympian demigod, Hercules. She pairs up with, though not romantically, with Captain America (still friends from her Avenger times) and a couple others in the Marvel Universe or just goes solo and shows everyone that though her hair style and color changes constantly, her abilities stay strong. This even includes a stint on the West Coast where she puts together her own band of heroes called the Champions.
Then comes the SHIELD days and after that, her reputation and her position in the scheme of things is set. Natasha Romanova, the Black Widow, is set for, apparently, a while.
Of course, in the comic world, nothing stays for long and that holds true with Natasha. Things change a lot for her but through it all, she stays the Black Widow.
Except for the other Black Widow, a replacement for Natasha when she went rogue but she died.
And except for the retcon that says Natasha was really born in the late 20's and was the product of some secret serum that keeps her young and she was friends with Captain America in the 40s but neither remembered decades later and she palled around with a mutant dude named Logan long before he became known as Wolverine but then they forgot each other as well.
Life does get strange in the comic universe especially after 50 real years go by. But regardless of which rendition of the Black Widow you read, she stays awesome.
For the record, while Natasha/Natalia Romanova/Romanoff is the Black Widow, she is not the only one in Marvel's comic history.
In the 1940 a Black Widow named Claire Voyant was a servant of Satan who killed bad people and brought their souls to her master. She would be retconned a couple of time over the decades but she was always not a nice person and never a spy.
Monica Chang-Fury is a Black Widow in the Ultimate Marvel Universe but she did not do much or get much on-page time and she is killed.
Jessica Drew is a clone of Spider-Man in the Ultimate Universe again who liked going by the alias Black Widow (why she thought that was a good idea ...).
Marvel had a series set in the future, 2099, and there was a Black Widow there as well but she also was not a spy and liked to eat human males after sex.
Finally, there was a second Black Widow in the same Universe as our Romanova, one about whom a separate section is worth so you can check out in her own page.