The two leading concepts for confining high-temperature fusion plasmas are the tokamak and the stellarator. Tokamaks are rotationally symmetric and use a large plasma current to achieve confinement, whereas stellarators are nonaxisymmetric and employ three-dimensionally shaped magnetic field coils to twist the field and confine the plasma. As a result, the magnetic field of a stellarator needs to be carefully designed to minimise the collisional transport arising from poorly confined particle orbits, which would otherwise cause excessive power losses at high plasma temperatures. In addition, this type of transport leads to the appearance of a net toroidal plasma current, the so-called bootstrap current. Here, we analyse results from the first experimental campaign of the Wendelstein 7-X stellarator, showing that its magnetic-field design allows good control of bootstrap currents and collisional transport. The energy confinement time is among the best ever achieved in stellarators both in absolute figures (E > 100ms) and relative to the stellarator confinement scaling. The bootstrap current responds as predicted to changes in the magnetic mirror ratio. These initial experiments confirm several theoretically predicted properties of W7-X plasmas, and already indicate consistency with optimisation measures.