Forward flights of a bilaterally symmetrically flapping butterfly modeled as a four-link rigid-body system consisting of a thorax, an abdomen, and left and right wings are numerically simulated. The joint motions of the butterflies are adopted from experimental observations. Three kinds of the simulations, distinguished by ways to determine the position and attitude of the thorax, are carried out: a tethered simulation, a prescribed simulation, and free-flight simulations. The upward and streamwise forces as well as the wake structures in the tethered simulation, where the thorax of the butterfly is fixed, reasonably agree with those in the corresponding tethered experiment. In the prescribed simulation, where the thoracic trajectories as well as the joint angles are given by those observed in a free-flight experiment, it is confirmed that the butterfly can produce enough forces to achieve the flapping flights. Moreover, coherent vortical structures in the wake and those on the wings are identified. The generation of the aerodynamic forces due to the vortical structures are also clarified. In the free-flight simulation, where only the joint angles are given as periodic functions of time, it is found that the free flight is longitudinally unstable because the butterfly cannot maintain the attitude in a proper range. Focusing on the abdominal mass, which largely varies owing to feeding and metabolizing, we have shown that the abdominal motion plays an important role in periodic flights. The necessity of control of the thoracic attitude for periodic flights and maneuverability is also discussed.