RedDoorz interview question

What is the difference between Map() and Flatmap()? Write an example code for same.