for sub-pages of current page
check wp_list_pages()
<?php
$page_id = get_the_ID();
wp_list_pages( array( 'child_of'=>$page_id ) );
?>
and for sub-categories of the parent category check wp_list_categories()
<?php
$cat_id = get_query_var('cat');
if( !empty($cat_id) ) {
wp_list_categories( array( 'child_of'=> $cat_id ) );
}
?>