Last Updated 9/12/13 at 11:49 a.m. EST

New Yorkers narrowed the field of candidates vying for mayor to two (or maybe three) on Tuesday, setting up the stage for the next portion of the mayor's race.

Here's what happened: Democrat Bill de Blasio, according to returns so far, has barely crossed the 40 percent threshold needed to win his party primary outright and avoid a runoff. He bested better-known figures like disgraced former congressman Anthony Weiner and City Council Speaker Christine Quinn.

De Blasio's not out of the woods yet. As of Thursday morning, he had 40.3 perent of the vote, with 99 percent of the precincts reporting, and paper ballots are still being counted. Election officials have warned it could be days before the final tally is known. If he doesn't get 40 percent, he'll face second-place winner Bill Thompson in a runoff Oct. 1.

Republican Joe Lhota, meanwhile, won his mayoral primary easily, beating grocery store magnate John Catsimatidis 52.6 percent to 40.6 percent.

Want more politics news? Click here.

In this election, after a dozen years of leadership under Mayor Michael Bloomberg's, New Yorkers chose from a slew of candidates who, for the most part, were not well-known outside the city (or for many, within the city).

Now, come January, either de Blasio, the city's public advocate, or Lhota, the former head of the Metropolitan Transportation Authority, will take the reigns of the most important city in America (with Thompson continuing to hold out hope that he'll be in the mix too).

Chances are unless you've been following the race closely, you may not be familiar with any of them. Here's what you need to know.

De Blasio's the public advocate. What is that?

De Blasio might not be famous, but he holds an important position. The New York City Public Advocate is one of just three positions elected city-wide in New York, in addition to the mayor and comptroller. First in line of succession after the mayor, the public advocate essentially functions as a city watchdog or ombudsman. It's a relatively new post created in 1993, and de Blasio was elected in 2009. As public advocate, de Blasio is also a non-voting member of the city council.

What's de Blasio's background?

De Blasio has had numerous roles in government and politics. Early in his career, he worked for David Dinkins' mayoral campaign and later worked in his administration. He led Bill Clinton's re-election campaign in New York, then in 1997 took a role overseeing New York and New Jersey for the Department of Housing and Urban Development, then run by Andrew Cuomo.

He was elected to a community school board in 1999, and he served as campaign manager for Hillary Clinton's 2000 Senate bid. He was elected to city council in 2001 and served in that role until taking on his current position as public advocate.

Who is Joe Lhota?

After a career as an investment banker, Lhota joined Mayor Rudy Giuliani's administration in 1994, serving as city finance commissioner, director of the office of management budget and ultimately deputy mayor for operations. As the New York Times writes, "few people know better than Mr. Lhota how government works." He got national attention for helping to coordinate the city's recovery in the wake of the 9/11 attacks. He also entered the spotlight for threatening to evict and cut off financial support for the Brooklyn Museum after it famously displayed artwork that some Catholics found offensive.

He returned to the private sector after Giuliani left office, and in 2012 -- following Gov. Andrew Cuomo's nomination -- he was confirmed as chairman of MTA. He's received high marks for the agency's handling of Superstorm Sandy.

As a Republican, does Lhota have a chance?

In New York City, registered Democrats outnumber registered Republicans six-to-one. And in big cities, Democrats almost universally dominate mayoral elections. But lately, that hasn't been the case in New York. The last time New Yorkers put a Democrat in the mayor's seat was when they elected Dinkins 20 years ago. As the New York Observer writes, "The last five mayoral elections have shown that New Yorkers are far more open to Republican candidates than they were back in the bad old days of the 1970s and '80s, when the GOP was content with 5 percent of the vote in some mayoral contests. But Mr. Lhota will still enter the general election as a decided underdog."

What are their positions?

De Blasio has squarely positioned himself as a liberal's liberal and frequently highlights the gap between the rich and poor in New York. He's also portrayed himself as a champion for those in the outer boroughs, channeling frustration some have had that Bloomberg focused too closely on Manhattan at the expense of other parts of the city. His signature causes are a promise to raise taxes on those earning more than $500,000 in order to fund a pre-kindergarten program. He's also said he would end the controversial stop-and-frisk program and force developers to build more affordable housing. Critics have painted De Blasio as a Park Slope yuppie who only took up the populist cause upon realizing it would play well in a mayoral election.

One of Lhota's signature issues is education reform, touting the need for more charter schools and more school and teacher evaluation. He's pledged not to raise taxes and says he would pursue a review of the city's real property tax assessment system, which he's characterized as unfair and opaque.

What's the deal with Bill Thompson?

Thompson has 26 percent of the vote, as of Wednesday morning, and would face de Blasio in a runoff election if de Blasio's portion of the vote dips below 40 percent. That might not seem like very high numbers for Thompson, but he's held his own before. In 2009, he narrowly lost to Bloomberg in the mayoral election. He served as the city's comptroller from 2002 to 2009.

Thompson is the the only African-American candidate in the race, which could make him attractive to some voters. It's also unclear exactly where supporters of Quinn would line up in a runoff. If they go for Thompson, he could give de Blasio a run for his money.

Who is Bloomberg supporting?

The three-term mayor didn't offer an endorsement, but he garnered a lot of attention when he recently accused de Blasio of running a "racist" campaign by using his family to gain support (de Blasio's wife is African-American, and he has biracial children). Ironically, some have said Bloomberg's criticism of de Blasio probably helped the candidate.

Without saying who he would vote for, Bloomberg says the New York Times "was right" to endorse Lhota in the Republican primary and City Council Speaker Christine Quinn -- de Blasio's rival -- in the Democratic primary.