I've been coding and designing for years but I've never used Illustrator so what does that software do?
Illustrator is a vector design software. It's different to photoshop because of the way to create an object. Photoshop is raster design software with vector elements: pen tool and shapes. You can use Illustrator to draw logos, portraits and illustrations as it's more flexible for such kind of work (you can easily change the object contours.
As Artimmi has mentioned Illustrator is a vector design software. You can make nice vector objects with this software. It has more advanced features then photoshop for vector graphics.
not only the vectors you can do some bitmap operations too. but mostly illustrator is used for vector graphics like coreldraw. Its a very useful tool for me to do my web designs. mostly illustrator is used for printing graphics.
TO be honest im in the same boat as the OP, im an inquisitive designer and have tried using Illustrator a couple of times but then found no real use to it, so tried picking it up from a few tutorials and to be honest they really do help!