If you earn $4000, you're allowed to put $2k in an IRA and your wife is allowed to put $2k in her IRA, whether or not she earned income. The "spousal" part just indicates that the owner doesn't have to have earned income to contribute.

<<<<<If I am the only wage earner in the family, do I have to open a spousal IRA for my wife in order to put money into it?>>>>>

There's no requirement that your wife have an IRA, nor that anything be contributed if she does.

<<<<<Can she open an IRA while she is still working and continue to put money into that account when she is no longer receiving earned income?>>>>>

Yes.

<<<<<I believe that we can contribute $2000/year for her, regardless of employment status, but how do the mechanics of this work out? >>>>>

Mechanics are no different based on employment status. The custodian of the IRA doesn't know or care about your wife's employment status.