In my local machine if I set the IP address to an interface, how other machines know this and route the packets to me if anyone tries to send packets to my new IP? I am in a private network.
Simple answer: The machines don't know the route.
The IP address that you use must be in the range of the so-called "subnet" the machine belongs to.
This means that all machines that can be reached without using a router in between must have an IP address in the same range and all these machines need to know this range.
In an Ethernet network you need the MAC address of a machine to send data to that machine.
If a machine wants to send data to another machine, it will first send an ADP packet (used together with IPv4) or an NDP packet (IPv6) to all machines in the "subnet".
This ADP or NDP packet contains the IP address of the machine to which the data shall be sent. The machine having that IP address will send an answer back to the machine that wants to send the data.
The first machine now knows the MAC address of the second machine and can send data to the second machine.
In (very) old Ethernet installations data was always sent to all machines in the network. It was the task of the network card to filter out all data that was sent to machines with another MAC address.
In current Ethernet installations "switches" are used. When data is routed through a switch, the switch remembers the sender's MAC address and the "port" (the cable) on which the data was received. When a packet shall be sent to that computer later, the switch knows the route to this MAC address. When a switch does not know the route, it routes the data to all ports (which may mean: to all computers in the "subnet" - just like in old Ethernet installations).
If a router is between two computers, the computers are in different "subnets".
In this case the computers must know the (MAC or IP) address of the router which is used to reach the destination computer's "subnet".
In the case of an IPv4 home network the DHCP protocol is often used to tell all computers the IP address range of the home network (which is a subnet) and the "default router" (which is the router that must be used for all IP addresses outside that subnet). This information does not change if you change the IP address of your computer because the new IP address must be inside the IP address range of your home network.