As an undergraduate, you must complete the following tasks:
Better 10th and 12th-grade point averages, at least above 80% in both.
Maintain your academic focus.
Choose a non-engineering subject for your undergraduate studies. It will help your profile.
Attempt to score above the 99th percentile on the CAT. If you want, you can do coaching during your undergrad.
Enhance your communication and writing abilities. This will be beneficial in WAT and GD/PI. If you want, you can join Toastmasters or start a blog.
If you want, try to participate in some extracurricular activities. This will not improve your IIM chances (unless you have a national-level certificate), but it will add some vibrancy to your profile. Activities can range from being a member of a club or placement cell to creating your own YouTube channel.
Perform some internships or work as a freelancer on a project. It will provide fodder for conversation in interviews.
Since IIMs are reputed educational institutions they need to maintain their brand image and for that, they need good quality students.
You should focus on the following components in order to get admission at IIM:
Having an excellent profile will not only help you in getting a good selection but also help in getting a good placement as well.