Why are state capitals named state capitals?

you know about "capital" letters, right? well, capital means "the highest" and a state capital is the biggest, most important part of the state.