how to create child posts with parent post in wordpress?

first you can know the relationship between child post and parent post try to figure it out or just try this code

     $query = new WP_Query( array( 
    'post_parent' => get_theID(),
    'posts_per_page' => 3, //shows only 3 children. If you want to show all of them, comment this line
));
while($query->have_posts()) {
    $query->the_post();
    /*Output the child markup here*/
    the_content(); //Outputs child's content as it is
}
wp_reset_query();

?>