IPCalculus interview question

What is difference between switch, hub and router?