I have an lenovo g50 and i was thinking about building an gaming desktop?

But my question is, can I use my i7-5500 in a computer
PS: i do not understand a lot of computers i'm just trying not to buy pieces that i already have i'm trying to save some money

Lenovo G50 is a laptop and a Laptop CPU will not fit onto a desktop Motherboard.
The Socket is quite Different. You can't even use the RAM in the Laptop on the Desktop.

Lol, no. That is a laptop CPU. There's no desktop version of that BGA 1168 socket. In addition to that, any BGA type socketed CPU is soldered to the motherboard.

Here is the rule about sockets:

Not only do the socket types have to match, the firmware (BIOS or UEFI) of the motherboard has to support the CPU. An older LGA 1150 CPU is not compatible with an LGA 1151 motherboard. In fact, most PC enthusiast hate that Intel comes out with a new socket type every 2 years because they can't use the new CPU's on their older motherboards.

Earlier this year Intel released their Kaby Lake 7th Generation processors. People had to update the BIOS on their current 100 chipset series LGA 1151 motherboards. Pretty much every board partner like Asus, MSI, and Gigabyte wrote a compatible BIOS as soon as they could.

In other cases, you could pick up an old HP Pavilion desktop with a Socket 1155 motherboard and a 2nd Generation Sandy Bridge processor like the Core i3-2100. HP did not write a firmware/BIOS update or those Desktops that supported the 3rd Generation Ivy Bridge processors which share the same LGA 1155 type socket. So there's no way to upgrade to the Core i7-3770 which is the best LGA 1155 CPU you can buy.

Intel makes money by doing this, make no mistake about that. Every time you buy a motherboard, you're also buying a PCH chipset that's also made by Intel. Intel sells these PCH (Platform Controller Hub) chips to the board makers like Asus, Gigabyte, and MSI, then these companies sell you the motherboards with the chipset and that add to your cost.

In a way this makes sense because the PCH is designed to work with a certain series of processors. They really dummyproof this by redesigning the sockets so no one can place a Socket 1151 CPU on a 1150, 1155, or 1156 socket.

Don't get tricked by the Core i7 name your CPU has. It's a low power dual-core CPU that's slower than an $80 Pentium g4560 CPU. You're much better off buying a new CPU for your gaming rig. If you don't want to spend a lot then you can look at the AMD Ryzen 3 processors which are good for gaming. If you have your heart set on Intel then I suggest waiting for their 8th Generation Coffee Lake processors. The only processor Intel has that is a decent buy for a gaming rig is the Core i7-7700k and you only need that if you're pushing a 144hz refresh rate monitor and you have a GTX 1080 or higher graphics card. If you're gaming on a 1080p, 1440p (2k), or 2160p (4k) monitor with a 75hz or lower refresh rate then an AMD Ryzen 5 1600 is the best CPU you can get before you start seeing diminished returns for gaming.

You can use pcpartpicker.com to configure a PC. If you get stuck then you can either ask a question on their forum or on here.

https://pcpartpicker.com/list/

No, you can't use any part of your laptop to build a desktop.