We propose a review of the current knowledge about the synthesis, magnetic properties and applications of magnetic cylindrical nanowires and nanotubes. By nano we consider diameters reasonably smaller than a micrometer. At this scale, comparable to micromagnetic and transport length scales, novel properties appear. At the same time, this makes the underlying physics easier to understand due to the limiter number of degrees of freedom involved. The three-dimensional nature and the curvature of these objects contribute also to their specific properties, compared to patterns flat elements. While the topic of nanowires and later nanotubes started now decades ago, it is nevertheless flourishing, thanks to the progress of synthesis, theory and characterization tools. These give access to ever more complex and thus functional structures, and also shifting the focus from material-type measurements of large assemblies, to single-object investigations. We first provide an overview of common fabrication methods yielding nanowires, nanotubes and structures engineered in geometry~(change in diameter, shape) or material (segments, core-shell structures), shape or core-shell. We then review their magnetic properties: global measurements, magnetization states and switching, single domain wall statics and dynamics, and spin waves. For each aspect, both theory and experiments are surveyed. We also mention standard characterization techniques useful for these. We finally mention emerging applications of magnetic nanowires and nanotubes, along with the foreseen perspectives in the topic.