The cdi's main function is to control the point at which the spark is delivered to your spark plug, the cdi basically took the place of the old points systems. If it runs at all the cdi and the stator are good, as well as the coil. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.