The subquery is a normal query nested inside another query. Here is the basic syntax to use subquery with IN operator:
WHERE value IN (SELECT column_name
For example, if you want to list the product details with orders quantities greater than 100.
WHERE Id IN (SELECT Product_Id
WHERE Quantity > 100)
You can check out this SQL Tutorial blog learns subqueries and writing complex sub-queries.