The payments made by the protection buyer to the seller are the premium leg. On the other side of the contract, the protection seller must make a payment to the protection buyer in case of a default; these contingent payments make up the protection leg.
The difference between the present value of the premium leg and the present value of the protection leg determines the upfront payment.