They have the same number of teeth and fit together as one. Involute splines have teeth similar to gear teeth except spline teeth are much shorter, and they do not roll.
We will only be considering involute splines here because they are much more common. Splines may be straight sided, tapered, or have an involute form. Splines provide a connection between two shafts or other components that transmit torque and rotation.