Well... First of all I would tell you what is an Index?
The fundamental of any market is there exist different kinds of people having different opinion. For eg: If there is a seller then one has to be a buyer.
Similarly in stock market one expects a particular company to proper whereas the other thinks the reverse. This creates a market where there is a seller and a buyer both holding different perspective mindset.
A falling stock price indicates there are too many sellers and less buyers and vice versa.
Now to determine the overall performance of the stock prices an Index is computed.
Sens*x is an index of BSE. It is an Index consist of 30 companies average prices (calculated in different ways) . The selection of these 30 companies is in such a way that it reflects the overall markets performance. If you see that ,if sens*x is rising then, generally almost major stock prices goes upward and vice versa.
These 30 companies composition keeps on changing.
Similar is with Nifty. It is an index of NSE consist of 50 companies prices.
I hope you understood...