The full form of Sensex is Sensitive Index and of NIFTY National Fifty.
Sensex is a Bench mark index of BSE and Nifty is an Index of NSE.
Sensex 30 comprises of all major companies listed on BSE based on their market cap. and liquidity.
Some of the companies at present in SENSEX 30 are Reliance Ind., Infosys , Satyam ,TCS, LNT, etc.
The movement in the all 30 scripts makes a movement in Sensex i.e. it leads the sensex to go up or down.
The same is in case of NIFTY it comprises to top 50 stocks listed on NSE.
Their movement will deside index movement.
Some times we see Midcaps are positive even when Sensex is traling down 400 points , this is because Sensex is calculated on bases of 30 stocks in it.
This list can even change over a period of time. Check the full Summary here.