Contracts in multiple contract markets are closed sequentially, with the contract that resolved to ‘Yes’ always closed last (at the top of the list for that market in your trading History). Closing each winning contract involves the same calculations as if you were selling shares in that contract for $1 to another trader. In other words, PredictIt will credit or debit you the appropriate amount for selling shares in that contract after recalculating your market risk based on your holdings in the contracts that remain to be closed. Your overall credit in the market will be the sum of your credit in each individual contract.
Note that individual contracts in multi-outcome markets do not close and settle until the entire market closes and settles.