Have you swapped over the connection to the Cable Modem from one computer to another? If so, you need to follow the correct procedure.
Power everything off, including the Cable Modem which must be left without power for three or four minutes - this is *IMPORTANT* so that it loses the association between the existing connection (recognised by its MAC address) and the IP address that it has allocated to it.
Swap the connection over, then power on the Cable Modem and wait for it to be fully booted with all lights displayed. Boot the PC. A new connection will be recognised by the Cable Modem and a different IP address allocated, which should let you get online.
The procedure needs to be repeated when swapping back to the original connection.