It was a province of New Spain, then a Mexican State, a US Territory and finally it became a US State in 1912.
They share a common border.
No, the capital of Mexico is Mexico City. New Mexico is part of the United States.
Mexico lost half its territory, including New Mexico, at the Mexican-American War of 1846-1848.
It was a colony of Spain, officially named as "Viceroyalty of the New Spain", until September 27, 1821 when it was recognized as an independent country.