Display featured products by category

First, you have to determine from what category you want to display those products. If this happends on a single post display, you can get all post’s categories via wp_get_object_terms function

global $post;
$query_args[ 'category__in' ] = wp_get_object_terms( $post->ID, 'category', array( 'fields' => 'ids' ) );

If this happens on a archive page, you can get the category id from query vars:

$query_args[ 'cat' ] = get_query_var('cat');

Check http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters for more details.