This Demonstration illustrates the relation between B-spline curves and their knot vectors. Start with the control points

and a knot vector

, where the degree of the B-spline is

. The knot vector satisfies

and

. The B-spline basis functions are defined as:

,
and a B-spline curve is defined as:

.
For nonperiodic B-splines, the first

knots are equal to 0 and the last

knots are equal to 1. If

duplication happens at the other knots, the curve becomes

times differentiable. So, by overlapping the knots, you can generate a curve with sharp turns or even discontinuities.
When the number of control points is

, the basis functions are reduced to Bernstein polynomial, thus the curve becomes a Bézier curve.