This paper is intended to introduce the physics of X-ray free-electron lasers in the one-dimensional framework.