The "until marriage" part is usually part of the moral beliefs of the people who push for abstinence only sex ed in public schools, but I wasn't aware that public schools generally taught that part.
Though I think the true implication is "don't have sex until an impulse comes along to do so, that is strong enough to completely drown out the voice of your superego in your head. And then—if the impulse really is that strong—the 'proper' order to do things is to get married to that person, and then have sex with them."