You are confusing get_terms()
with get_the_terms()
get_terms()
returns an array all the terms in a taxonomy.
get_the_terms()
returns an array of all the terms for a particular post.
global $post;
$terms = get_the_terms( $post->ID, 'pa_size');
foreach ( $terms as $term ) {
echo "<li>" .$term->name. "</li>";
}
You might also like get_the_term_list()
which would be like so:
global $post;
echo '<ul>';
echo get_the_term_list( $post->ID, 'pa_size', '<li>', ',</li><li>', '</li>' );
echo '</ul>';