An overnight indexed swap (OIS) is an interest rate swap (IRS) over some given term, e.g. 10Y, where the periodic fixed payments are tied to a given fixed rate while the periodic floating payments are tied to a floating rate calculated from a daily compounded overnight rate over the floating coupon period. Note that the OIS term is not overnight; it is the underlying reference rate that is an overnight rate. The exact compounding formula depends on the type of such overnight rate.
The index rate is typically the rate for overnight lending between banks, either non-secured or secured, for example the Federal funds rate or SOFR for US dollar, €STR (formerly EONIA) for Euro or SONIA for sterling. The fixed rate of OIS is typically an interest rate considered less risky than the corresponding interbank rate (LIBOR) because there is limited counterparty risk.