Capital has many meanings, including meaning the city that is the seat of government for your state or country. Capitol refers only to capitol buildings.
If you’re going to the capital, you spell capital with an A and don’t capitalize the word.
Capital refers a city that is the seat of government for its region or is important in some way, but it has many other meanings too. A capital is an uppercase letter. Capital is wealth or money, especially in the context of business:
Squiggly needs capital to get his hot chocolate stand up and running.
Capital can also mean “particular or significant”:
It is of capital importance that we arrive early so don’t end up in the back.
And it can also mean “fabulous”:
Bringing songs to sing on the bus? That is a capital idea!
And of course, we have capital crimes and capital punishment, which relate to the death penalty.
The other kind of capitol refers to buildings—state capitol buildings or, in the United States, the Capitol building in Washington, D.C.
Capitol with an O is only for buildings; that’s its only use. You capitalize it when you’re writing about the Capitol building in D.C. where the senators and representatives meet, and you leave it lowercase when you’re writing about a state capitol building.
Since capitol with an O is just for buildings, you can remember the spelling by thinking that the big rotunda of the Capitol building is round like the letter O in the word.