The princely states were ruled by a local or regional ruler who were in a subsidiary alliance with the British. At the time of the British withdrawal, 565 princely states were officially recognised in the Indian subcontinent apart from thousands of zamindari estates and jagirs.
The era of princely states ended following the independence of India. Most of the Princely states were integrated into the Indian Union through the efforts of Sardar Vallabhai Patel.
For further reading check the following articles: