First of all , for a wired coonection. To connect two computers to the same internet cable you should have a switch or a hub.
Connect the internet cable and the 2 network cables from the computers to the switch/hub. The two computers must have installed network cards or have an integrated network card on the motherboard.
You can't have two computers with the same ip. The ip is different for all computers in a network.
If you ISP has some kind of authentification on the connected computers like authentification by MAC or by user you should contact them
and notify them about the second computer to register it in the network.
For a wireless connection your computers should have wireless cards installed. You need also an access point where you connect your internet cable.