Cost of carry is the extra cost the seller asks from buyer towards the interest and other expenses that he has to pay towards holding the underlying till expiry date.
So for nifty MAY series, the seller has to hold the NIFTY stocks in his account till expiry. So he is blocking the funds worth underlying value of 1 nifty and hence loosing
the opportunity cost of investing this money somewhere else.. (at the minimum, putting it with bank and getting minimum interest rate on it).
so he will add that extra cost to the current spot price and quote the sell price for MAY future.
In commodities world, this cost of carry will have interest cost and storage cost of physical good till expiry. (i.e if seller of gold MAY contract has to hold the gold with custodian and incurr some charge till MAY settlement date)
You can google on this and find more accurate info on this.
This all is theory which doesn't work in market. -ive cost of carry does not follow above logic. So keep the theory aside while trading.
Happy Trading.