E-Fill Electric interview question

How UART work and write a small programme