First, you'll want to do this wirelessly. Running a copper network cable (CAT5, etc.) between equipment (computers and other network gear) that is plugged into two
different electrical systems (your house & the neighbor's house) is going to cause problems. The slight differences in voltage between these homes is going to try to equalize
over the copper network wiring between the two homes. The points of connection will be the router in one home and the network device in the other (this can be the computer network card or other switch). You will be repairing and / or replacing these parts pretty often - especially after lightning storms. Of course, if you run fiber between the two locations, this voltage equalizing problem won't be an issue and the network will be very reliable and extremely fast. This is highly recommended but is also costly.
My suggestion is that you use a pair of high gain, directional antennas pointed directly at each other (if signal strength is an issue). The more gain they have, the better the wireless performance of the network and the longer the range will be (this is very helpful if you're more than 100 yards apart). Since the signal is concentrated in only one direction, it restricts the ability of the network to be detected all directions by those not it is not intended.
To do this, you'll need to utilize network hardware that supports the use of external antennas. This is accomplished by devices that have removable antennas, secured by threaded antenna jacks. You would disconnect the supplied antenna from the router, and connect a short length of antenna coax cable designed for this use (the shorter; the better) between the new antenna and the antenna jack of the router.
You would do the same thing in the second location, too. You would use the wireless signal utility to help you aim the antennas at each other. Once the highest signal has been found, secure the antennas in position.
This second location could be a single computer with the network card's antenna replaced - or, optionally you could install a second wireless router so that you could connect more than one computer easily via CAT5 cabling in the second location. This would be done with wireless routers that are capable of "Wireless Bridging" This is easier (less expensive, too) than trying to aim multiple antennas in the second location at the router in the first location.
A detailed site offer a great deal of information to do this. They also have firmware that you would use to replace the factory firmware of some routers that make it easy to adjust and configure your network. For instance, I used a couple of LinkSys routers from eBay that cost me about $50 each, and a couple of antennas and 3 foot long coaxial cables for another $100. For about $200, I was able to exactly what you're trying to do. Check the site. Review the list of routers that is supported by the firmware if yours is on it - you're that much further ahead - if not, well, it will be easier to get what they suggest. Download and flash the routers. Configure Bridge mode and see if you're close enough for decent speed and reliability. If lacking - consider purchasing antennas.
There's a LOT of info to learn, but if you take your time, read, ask questions there - you'll get what you need. Check out the site:DD-WRT
This is a starting point and should give you a point to start learning more about this. Please rate my reply. Thank you.