FTP port connection: what it is and how to use

What is FTP port number? How to configure active and passive mode? What is SFTP port connection? The difference between these two ports.