The best way to glue PVC pipe fittings onto pipes is by using PVC solvent cement. PVC solvent cements temporarily melt the surfaces of the PVC materials you apply them on. While these surfaces of the PVC melt, you can put them into contact with each other to form a chemical bond as it dries. Make sure to twist the pipe and the fitting a bit to ensure a properly sealed connection when using PVC solvent cement. Read more