Complex sentence: The purpose of the playpen is to confine a very small child who might otherwise wander off and hurt themselves, usually used when the person watching the child is pre-occupied with something and cannot watch the child directly.
Split into simpler sentences: The purpose of the playpen is to confine children, who might otherwise wander off and hurt themselves. It is usually used when the person watching the child is pre-occupied with something and cannot watch the child directly.