The short version
Total cost of ownership is an estimate of everything an asset costs across its lifecycle: acquisition and licensing, implementation and integration, training, ongoing operation and support, upgrades, and decommissioning or migration at the end. It was popularised in technology buying, where the licence fee is routinely a minority of what the system actually costs.
Why the boundary is the battleground
When two vendor quotes are being compared, whoever draws the TCO boundary controls the comparison. Exclude exit and migration costs and the platform that is hardest to leave looks cheapest, which is exactly backwards: switching cost is a real cost, and it compounds by becoming negotiating leverage the vendor holds at every renewal. Price internal effort at zero, as many comparisons do, and the solution that consumes your best people for a year appears free. A vendor-supplied TCO model should be read as a proposal document, because that is what it is.