The OIS represents the cost of repeated overnight unsecured lending over periods of up to two weeks (sometimes more). Whether it is secured or not depends on which of the overnight rates it is linked to. Because it is based on overnight lending, it is assumed to have a lower credit risk than longer term interbank loans based on say 1M, 2M or 3M Libor and this is what drives the OIS-Libor spread.
An overnight index swap (OIS) is a swap in which one party pays a fixed rate of interest known as the OIS rate which depends on the term of the swap and is known at trade inception.
The other party pays the rate equivalent to the daily compounded index rate over the life time of the OIS. This is not known until the end of the life of the OIS.
To make the OIS swap have zero initial value at inception, which is how it is traded, the OIS rate therefore must equal the market's expectation of what the compounded daily (geometric average) index rate will be over the lifetime of the OIS.
In USD the index rate is the fed funds rate which is linked to the cost of unsecured lending. In Euros the unsecured lending rate to which the OIS is linked is EONIA and in Sterling it is called SONIA where ONIA stands for overnight index rate. However more recent overnight indices like the USD-denominated SOFR are based on secured lending.
The main use of OIS swaps is to allow banks to lock in the cost of unsecured overnight funding in advance.
Finally, your confusion may be due to the use of OIS for discounting of collateralised non-cleared derivatives. This is market practice since 2008. The OIS rate is used because it is close to the typical interest rate paid on the collateral that is held. It becomes the best estimate of the risk-neutral risk-free rate in a world where the collateral has effectively eliminated counterparty risk.