Both are used as soil amendments in growing media.
Perlite is a volcanic glass that expands when heated to high temperatures, forming small, white, porous granules. It has a high water-holding capacity, but also drains well, preventing waterlogging and root rot. It has a neutral pH and does not affect the soil acidity or alkalinity. It has a high air-filled porosity, providing good aeration and oxygen to the roots. Perlite improves the soil structure and drainage, especially for heavy or clay soils, reduces soil compaction and increases root growth and development, enhances seed germination and seedling emergence and moderates soil temperature and reduces heat stress.
Vermiculite is a hydrated magnesium-aluminum-iron silicate that expands when heated to high temperatures, forming thin, brown, flaky plates. It has a very high water-holding capacity, but also drains well, preventing waterlogging and root rot. It has a slightly acidic pH and can lower the soil pH slightly. It has a moderate air-filled porosity, providing adequate aeration and oxygen to the roots. Vermiculite is not reusable and can degrade over time and lose its properties. It improves the soil moisture retention and availability, especially for sandy or drought-prone soils, reduces soil erosion and leaching of nutrients and it enhances seed germination and seedling emergence.
Generally you'll want to use perlite when you want to increase drainage and aeration and vermiculite when you want more water retention at the expense of lowering the soil pH slightly.