Hacktiv8 Interview Question

How react works? Please explain how javascript works?