Hardened tree sap is called amber.
Sometimes, isects get caught on this sap, and when it hardens, it remains with the insect inside of it, as if it were a fossil.
→ The image below shows a mosquito that was found inside a piece of amber.
Hope it helped,
BioTeacher101