Although many characteristics of the resting state and task states have been studied, it is still unclear how the brain network switches from the resting state during tasks. The current theory is that the brain is a complex dynamic system and synchrony is defined to measure brain activity. This study compared the changes in synchrony between the resting state and different task states in healthy young participants and examined the ability to switch from the resting state to the task-general architecture of synchrony. We found that the synchrony increased significantly during the tasks and the brain has the task-general architecture of synchrony during different tasks, the increase of synchrony in high-order cognitive networks is particularly obvious, while the increase in the sensorimotor network is relatively low. In addition, the high synchrony of high-order cognitive networks in the resting state can promote effective task switching and the pre-configured participants have better cognitive performance, which shows that the spontaneous brain activity and cognitive ability are closely related. These results revealed changes in the configuration of the brain network for switching between the task states and the resting state, highlighted the consistent changes in the brain network between different tasks, and found that there is an important relationship between switching ability and cognitive performance.