How to set the width and height rule for featured image

You can set default site for featured images using set_post_thumbnail_size() or request different registered size by providing it as argument in the_post_thumbnail() call.