It can be used in general to simply 'point' at a desired course.....
So on take-off, you may have your heading bug set to the Runway Heading (say 070 degrees) but your departure clearance may be to "Turn right to heading 120 after 6 miles DME"....
.... so you could set your Course Indicator to that initial course.
But of course as we all know it's main purpose is to set th "Final Inbound Course" of the ILS Runway that you're about to land at.
This is simply so that the CDI (Course Deviation Indicator - the part of the line that moves to line up when you're on the Localizer or VOR course) is pointing straight ahead when you're on finals, so you can accurately track the LOC signal.