Prevent is followed by from or by a possessive: They prevented me from going or they prevented my going. The former is more common, and is often preferable when the verb is followed by a noun: We prevented the baby from falling rather than we prevented the baby's falling (a listener could not tell whether there was one baby or more). Constructions such as They prevented me going; we prevented the baby falling are best avoided in formal writing, as some people consider them incorrect. They are very common in speech, and there is no reason not to say them.