A host masks its own IP address and the destination IP address. If the results are equal, the destination is on the same network, and the host will look for the destination MAC address in its ARP cache, send an ARP request if it is not found, then send the resulting frame via layer-2. If the network is not the same, the host will send the frame to its configured gateway.
If the host mask is larger than the network mask, the host will not be able to communicate with all the IP addresses in the network since it will send packets for those addresses outside the mask to the gateway, which will ignore them because they are on the same network as the gateway sees it.
If the host mask is smaller than the network mask, the host will not be able to communicate with hosts in any other networks encompassed by the mask since it will never send the packets to the gateway as it must to reach those networks.