How does email validation work?

Email validation best practices