What to know about NATO as Trump meets alliance leaders in Brussels Its goal is to "safeguard the freedom and security" of the 29 member countries.

 -- President Donald Trump will attend a NATO meeting in Brussels on Thursday with heads of state from all twenty-nine members, despite his past criticism of the alliance.

On the campaign trail and as president-elect, Trump repeatedly called NATO "obsolete," raising doubts about whether the United States, under his leadership, would help defend its NATO allies in Europe if Russia attacked them.

But during a press conference at the White House with NATO Secretary General Jens Stoltenberg in April, he reversed course and reaffirmed the U.S. commitment to the organization.

"The Secretary General and I had a productive discussion about what more NATO can do in the fight against terrorism," Trump said. "I complained about that a long time ago and they made a change and now they do fight terrorism. I said it was obsolete; it's no longer obsolete."

Trump has advocated that the alliance take on an increased role in the fight against ISIS. Stoltenberg said last week that NATO members were discussing that decision, though no combat troops would be deployed, he said.

So, what exactly is NATO? ABC News breaks down the organization’s history, importance and criticisms.

What is NATO?

NATO stands for the North Atlantic Treaty Organization, a security alliance established in 1949 during the early days of the Cold War to counter Soviet aggression in Europe.

Now numbering 29 countries in Europe and North America, the alliance’s goal is to “safeguard the freedom and security of its members through political and military means,” according to its website.

The organization promotes “democratic values” and encourages member nations to work together on issues of defense and security to prevent long-term conflict.

When security disputes occur, NATO advocates peaceful resolutions. There are guidelines for the use of military force, outlined in Article 5 of the Washington Treaty, the founding treaty of NATO.

NATO adheres to a policy of collective defense, meaning an attack on one member is considered "an attack against all." The policy is outlined in Article 5 and has only been invoked once, after the Twin Towers in New York City were attacked Sept. 11, 2001, and NATO members sent troops to Afghanistan.

After the Taliban fell, a United Nations Security Council resolution established the International Security Assistance Force (ISAF), under NATO’s control, to stabilize the country. There were 1,044 non-U.S. NATO service members killed fighting in Afghanistan.

How does NATO work?

Headquartered in Brussels, Belgium, each member nation is represented by an ambassador that sits on the North Atlantic Council (NAC), the alliance’s political decision-making body. The NAC meets at least once a week and is chaired by Secretary General Stoltenberg, the former prime minister of Norway.

When political decisions require military involvement, NATO’s Military Committee helps plan the military elements needed for an operation. While NATO has few permanent military forces, member nations can voluntarily contribute forces when the need arises.

The Military Committee is made up of the Chiefs of Defense of NATO member countries; the International Military Staff, the Military Committee’s executive body; and the military command structure, composed of Allied Command Operations and Allied Command Transformation.

Where is NATO operating right now?

Currently, NATO’s website lists five active operations and missions: Afghanistan, Kosovo, securing the Mediterranean Sea, supporting the African Union, and policing airspace.

Who pays for NATO?

NATO recommends that member countries spend 2 percent of their gross domestic product (GDP) on defense.

Only five members meet that goal: the United States, Great Britain, Greece, Estonia and Poland.

Trump has brought that shortfall front and center in his comments about the alliance. In a January interview with The Times of London, Trump mentioned the five, saying, "There’s five countries that are paying what they’re supposed to. Five. It’s not much."

It's an issue that Secretary General Stoltenberg has embraced, saying in April's press conference that fair burden-sharing has been his "top priority" since taking office.

"We have now turned a corner," Stoltenberg said. "In 2016, for the first time in many years, we saw an increase in defense spending across European allies and Canada -- a real increase of 3.8 percent or $10 billion more for our defense."

"We know that we all need to contribute our fair share because we need to keep our nations safe in a more dangerous world," he added.

What is the history behind its origin?

The North Atlantic Treaty was signed April 4, 1949, in the aftermath of World War II and rising geopolitical tension with the Soviet Union.

NATO’s website lists three purposes for its creation: “deterring Soviet expansionism, forbidding the revival of nationalist militarism in Europe through a strong North American presence on the continent, and encouraging European political integration.”

As the Cold War settled in, NATO stood in opposition to the Soviet bloc, communist nations allied with the Soviet Union.

In 1991, after the Soviet Union dissolved, NATO developed partnerships with former adversaries.

NATO had its first major crisis response operation in 1995, after the Bosnian civil war in Bosnia and Herzegovina.

More recently, NATO responded to the Libyan crisis in 2011 by carrying out airstrikes to protect civilians under attack by the Gaddafi regime.

Who are the critics of NATO?

Trump isn’t the first U.S. official to criticize other NATO members for contributing less than the United States.

In 2011, Defense Secretary Robert Gates called the future of NATO “dim” if other nations didn’t increase their participation in allied activities.

“The blunt reality is that there will be dwindling appetite and patience in the U.S. Congress -- and in the American body politic writ large -- to expend increasingly precious funds on behalf of nations that are apparently unwilling to devote the necessary resources or make the necessary changes to be serious and capable partners in their own defense,” he said.

Gates made the comments prior to Russia's annexation of Crimea in 2014 and escalating regional tension there.

NATO’s history is fraught with waves of other criticism, often in moments of relative peace. After the fall of the Soviet Union, critics alleged that a European alliance was no longer necessary to counter communist governments. But militant nationalism was still occurring and soon NATO was put to the test with the Balkan Wars. Indeed, changing security threats have consistently pushed NATO to evolve over the past 60 years.

Even Trump acknowledged the importance of the alliance in April, saying, "NATO allies defeated communism and liberated the captive nations of the Cold War. They secured the longest period of unbroken peace that Europe has ever known."

"This enduring partnership rooted out of so many different things, but our common security is always number one," Trump said, "and our common devotion to human dignity and freedom."

ABC News' Brian McBride contributed to this report.