PayPal interview question

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