The word, capital, is used for many things.
In contrast, the word, capitol, is only used for one thing – to refer to a building.
When referring to the U.S. Capitol building, Capitol is always capitalized. The state capitol is not.
When trying to remember which version of capital to use, think about this. Many capitol buildings have a dome on the top. Think of the dome as an O just like the O in capitol.