I will have to qualify that I am an electrical engineer, not mechanical, the process, except for specific coursework, is identical. Taking all of the advanced math classes available, algebra, geometry, trigonometry, analytical geometry, pre-calculus, calculus if it is offered, is the best foundation. Writing is often overlooked but is all important, especially if there is course in technical writing. Physics, followed by chemistry is also important. As for programming language, I would recommend focusing on C as that has been most prevalent for many years now, and you can get complilers for free.
Work hard on developing good study habits. This probably doesn't seem that important in junior high and high school, but it definitely will be in college. If you don't already do this, get in the habit of studying book material and work through example problems before the instructor lectures on the same material in class. That way, you will be pre-loaded with questions and everything the instructor says makes sense. This makes doing homework and studying for exams a breeze, and the increased efficiency of this study habit will reduce total study time and result in improved homework/exam scores.
After that, just follow your passions. Try to find the opportunity to talk with professionals in mechanical engineering and get as much knowledge about the different industries who employ them from aerospace, engine design, vehicles, robotics, etc.; career days are great. Also get inolved in local clubs that may be involved with robotics, computers, light aircraft, experimental vehicles, to name a few.