The Gram-Schmidt procedure is used to generate an orthonormal basis from a set of signals. It works by taking the first signal as the first basis function, and then generating subsequent basis functions as the components of the remaining signals that are orthogonal to the previous basis functions. Any signal can then be represented as a linear combination of the orthonormal basis in an N-dimensional signal space. A constellation diagram visually represents signals modulated with a digital scheme by mapping them to points in a signal space based on their amplitude.