How to Connect a Laptop to desktop computer
How to Connect a Laptop to desktop computer With LAN?
If you have a switch or router that has enough ethernet ports, you can plug both computers in and they should be able to communicate. If you are on wireless, just try to connect to the IP address of the other machine and see if it will work.
If you are wanting to share files, then you will need to create a shared folder on that machine and make sure both are a member of the same workgroup or homegroup.
If we could get some more information, it would be easier to be more specific. What are you trying to do when you connect them?