The overnight cost is typically used to refer to the interest rate charged by financial institutions (banks) who lend money to other banks. The rate is usually set by the central bank of a country which controls how much money in is the economy, this is called the money supply.
The overnight rate ensures that banks are able to keep enough money for its customers to access. A bank with $1m in deposits from it customers can lend a percentage of that money to other customers as a loan. The amount of money that banks can lend out is called the reserve ratio. If the reserve ratio is 14% then the bank can lend $860,000 out to its customers but has to keep the other $140,000 in its vault to ensure that it always has some money to operate with, this money is called the reserve.
If a bank lends out more than the ratio allows, then it has to borrow more money from somewhere else to ensure the reserve is available for its customers. Following the example from above, if the same bank lends $900,000 out, it needs $40,000 to meet the reserve ratio requirement. The bank can borrow the money from another bank. The bank can borrow the $40,000 from another bank at the overnight rate, the amount of interest charged is a cost to the firm that is borrowing the money as it is referred to as the overnight cost of funds.
The cost is the amount of money the borrowing bank has to pay back to the lender above the amount that was borrowed. The interest rate determines this amount, depending how long it takes for the borrower to pay back the loan. A $1m loan taken out over a year with an interest rate of 2.5% means that when the bank pays the money back in a year the total will be $1,025,000 and the "cost of funds" is $25,000.