The details of this war are sketchy at best, but both ground and space operations were involved. What we do know is the war must have only been fought on a limited basis and it ended with a negotiated settlement with the Cardassians. This settlement attempted (awkwardly) to define a straighter border, with the Federation ceding some colonies to the Cardassians, and the Cardassians ceding some to the Federation.
As part of this settlement, the Cardassians demanded that Federation citizens inside their new territory be evacuated, leaving the planets to be populated entirely by Cardassians. The Cardassians removed their citizens from Federation planets, but Federation colonists were very reluctant to leave their homes. It is not much of a surprise that those colonists were immediately the subject of severe Cardassian oppression and persecution. Those that remained formed the core of what would become the Maquis.