Domanda di colloquio di PayPal

How does a random forest work? What is the loss function to minimise for a support vector machine?