2 Years (11-12 or Inter) was the norm over a decade back. In the last decade it increased to 4 years (from 8th) and off late there are schools which do IIT orientation from 6th also !
Basically you have to be very sharp in Maths and Science. Both in theory as well as problem solving. Students who score very high in Maths and Science in their academic/board exams may not necessarily score high in IIT JEE. This is because complex problems are posed in JEE which are built from a combination of concepts in different chapters, where as generally academic exams have questions from individual chapters/concepts. For e.g A certain problem will have concepts of fluids, pressure, gravity, viscosity and time all integrated into one question.
You hence need skills to break down the problems in JEE into parts, apply the relevant concepts, and integrate the solution back again. All this needs to happen as fast as possible. Between candidates with similar intellect and knowledge of subject, those who do this faster get better ranks.
Check your aptitude towards Maths and Science, deeply understand the fundamental concepts and practice problemas as much as possible.
Needless to say, IIT JEE preparation needs high quality intensive coaching. You have an option of Classroom Coaching, Online Courses and Study Material. If you are in a good city and have physical access to a good classroom coaching facility, then it is the best option. But don't worry if not. Online courses and Study material are easily available from many providers like Plancess etc. You need to be very self-driven amd committed when going through Self-study/Online/Study Material courses as there is no teacher to pursue with you.