To use an analogy, if IPs are a building address, service ports are flat numbers. Both TCP and UDP uses incoming and outgoing ports for data communication. Most IP-based services use standard ports (HTTP TCP:80, SMTP TCP:25, and DNS TCP-UDP:53).
TCP stack has six flag message types to complete a three-way handshake:
Here is a packet capture for one of the websites I opened on the web browser. This shows a three-way handshake with SYN-SYN-ACK. By default, Wireshark will keep track of all TCP sessions and convert all sequence numbers (SEQ numbers) and acknowledge numbers (ACK numbers) into relative numbers. This means that ...