Ohhh, I know about this! Ghost guns are homemade guns that don't have serial numbers. The most common way to get them in the US is called an 80% kit. Basically the part of the gun called the receiver or frame is the only part of the gun legally considered a "gun". So you could order all the parts to make a glock brand handgun online (slide, barrel, lower parts, upper parts), and order an 80% receiver and that's not legally considered a gun because it's only 80% complete. You drill out some holes and mill out some places with a router or cut and sand it out with tin snips and a file or something, basically cutting out the remaining 20% of the plastic on the frame, and when you're done drilling, you legally have a gun. Now you put all the parts in it and it should work. It's not terribly difficult but you do need the tools, and it costs about the same as a regular pistol.
Alternatively, you can buy the parts and just 3D print the frame. If you have a printer this is easier, but printers are finnickey. This is functionally the same as an 80% frame.
Some ghost guns are all plastic and don't set off metal detectors, but these are usually small calibers, like .22, and they only work for one shot because they are destroyed on firing. Plus since they don't have a metal barrel, the bullets don't come out as fast as a real gun. The difference between the all plastic and an 80% gun is the 80% gun still has a metal slide, barrel and springs and is basically the same as a glock and can be fired as much as a normal gun. Basically there are two different types of ghost guns, one based on existing gun designs that uses existing gun parts, and one that's all plastic and undetectable. Fun fact: there's a law in the US that any gun, ghost gun or not, must have enough metal in it to set off a metal detector. Also in some states 80% frames are illegal.