This paper presents self-propelled swimming simulations of a foldable structure, whose folded configuration is a box. For self-locomotion through water the structure unfolds and undulates. To guide the design of the structure and understand how it should undulate to achieve either highest speed or maximize efficiency during locomotion, several kinematic parameters were systematically varied in the simulations: the wave type (standing wave versus traveling wave), the smoothness of undulations (smooth undulations versus undulations of rigid links), the mode of undulations (carangiform: mackerel-like versus anguilliform: eel-like undulations), and the maximum amplitude of undulations. We show that the swimmers with standing wave are slow and inefficient because they are not able to produce thrust using the added-mass mechanism. Among the tested types of undulation at low Reynolds number (Re) regime of (Strouhal number of about 1.0), structures that employ carangiform undulations can swim faster, whereas anguilliform swimmers are more economic, i.e., using less power they can swim a longer distance. Another finding of our simulations is that structures which are made of rigid links are typically less efficient (lower propulsive and power efficiencies and also lower swimming speed) compared with smoothly undulating ones because a higher added-mass force is generated by smooth undulations. The wake of all the swimmers bifurcated at the low Re regime because of the higher lateral relative to the axial velocity (high Strouhal number) that advects the vortices laterally creating a double row of vortices in the wake. In addition, we show that the wake cannot be used to predict the performance of the swimmers because the net force in each cycle is zero for self-propelled bodies and the pressure term is not negligible compared to the other terms.