EPAM Systems interview question

Explain promise and write code for promises & its related methods.