The basic physics underpinning space weather is reviewed, beginning with a brief overview of the main causes of variability in the near-Earth space environment. Although many plasma phenomena contribute to space weather, one of the most important is magnetic reconnection, and recent cutting edge research in this field is reviewed. We then place this research in context by discussing a number of specific types of space weather in more detail. As society inexorably increases its dependence on space, the necessity of predicting and mitigating space weather will become ever more acute. This requires a deep understanding of the complexities inherent in the plasmas that fill space and has prompted the development of a new generation of scientific space missions at the international level.