Preliminary reading: How is the a backend grid implemented?
The default template for a backend grid:

The keys are the sortOrder's, e.g:
The default UI component for a column is Magento_Ui/js/grid/columns/column:

It has the visible property:
The component observes it: