My setup:
I am using python3 and the socket module to setup a socket using ipv4 and tcp, listening and receiving data via an open port. I have a simple server and client where the client sends a request and the server responses. 
My problem:
I did some research and many people suggest that an open port is like an open door so how can I lock it? My goal is to secure my server and my client and not the data that is transmitted (which means the data shouldn't be altered but it does not matter if somebody reads it). I just want to make sure that neither the server nor the client receives wrong data or can be hacked in any way. If both the server and the client are normal computers with build-in firewalls are those sufficient?
Questions:

How can I make sure that the data I transmit can't be altered?
Is the firewall (normal firewall that every computer has built-in) of the server sufficient when listening, receiving and sending data via an open port? If not what can I do to make sure the server can't be hacked in any way (obviously not entirely but as good as possible)?
Same as question 2. just for a client (which as far as I am concerned does use an open port or at least not like the server)

PS: If possible using python.
A Basic level of security for the server side would be to send a random key along with the data for verification of trusted client. If the list of clients that are going to send data are known you can just whitelist the IP addresses which accept data only from a specific list of IP addresses.
How to secure a python socket listening, sending and receiving on an open port?