Accesing a nested table column
That's not a "nested table" (at least not in the sense as e.g. Oracle uses that term). The column still only contains a "single value" (which is a record though), not multiple rows. 

The second table contains a single column with the type table1 which is a composite type (a.k.a. "record").

To access the fields of the composite type, you need to enclose the column name in parentheses:

select *
from table2
where (col2).id = 42;


Assuming that the type type1 has a field named id