The client connects in plain text, the server advertises STARTTLS in its capability list, the client sends the command, and only then the TLS handshake starts. With implicit TLS (ports 465, 993, 995) the connection is encrypted from the start.
Between mail servers STARTTLS is opportunistic: if it is not offered or the handshake fails, most servers deliver in plain text. An attacker can strip the offer from the response (STARTTLS stripping). MTA-STS and DANE close that gap.
Use openssl s_client with -starttls to test it. If the server presents an expired certificate, many senders still deliver, while strict clients abort.
Example
openssl s_client -connect mail.example.com:25 -starttls smtp -servername mail.example.com