It appears to me that "collections" isn't something defined by the Ordinals protocol, and it's not something that gets stored on chain. Rather, there appear to be centralized repositories to which people can submit their collections to be indexed as such.
The Ordinals Wallet has a GitHub repository that accepts collection submissions via pull requests. OpenOrdex uses the same repository. Ordswap appears to be accepting them using a Discord bot. The submission format isThese use two very different in each casesubmission formats. There might be other repositories, but therethese were those I couldthe easiest to find quickly. I am not sure if there is any exchange of data between the marketplaces, but I would guess there isn't and that creators are expected to submit their collections to every marketplace where they want to be listed.