to prevent yourself from doing something keep from doing something She could hardly keep from laughing. I just managed to keep myself from falling.
to prevent somebody from doing something I hope I'm not keeping you from your work. keep somebody from doing something The church bells keep me from sleeping.
to avoid telling somebody something I think we ought to keep the truth from him until he's better. They don’t keep anything from each other.