Dear assaraf,
Open interest is the total open positions that are not closed, not squared off in futures and options (Derivatives) market.
At the end of each trading day, the open interest is calculated. Say if there is a new buyer comes to market and buys futures of XYZ scrip, then, open interest of XYZ is added by the value 1. If a person who has open position on XYZ scrip, in derivatives market, and if he closed the position, then XYZ's open interest is decreased by 1.
Say if a trader A buys a contract from a trader B the open interest added by 1. The next day if a trader C buys 2 contracts from a trader D, the open interest added by 2. The next day, if the trader A unwinding his or her position of 1 lot, open interest decreased by 1 if his or her counter party is either B or D. If the counter party of A is a new trader E, then open interest is unchanged as a new entrant E holds the position.
To put it simple, open interest is the open position in derivatives market at the end of a trading day. Observing open interest could give you some clue on the market (if you consider open interest of Nifty) or a stock. If the stock is moving up and you find a decrease in open interest, it shows the weakness of current trend (either upward or downward) you can expect the trend change. If open interest increases, it would support current trend, or current direction of the market or the stock.
Hope I have not confused you. Ask me if you have anything specific to know.
Regards