The chemical connection between psychedelics and amphetamines is the phenethylamine structure, which is the base of amphetamine (alpha-methyl-phenethylamine) and many psychedelic compounds such as mescaline and the 2C-X family. The phenethylamine structure, as well as the tryptamine structure can be found in lysergamides like LSD. There are also psychedelic or partially psychedelic compounds which are built off of an amphetamine structure such as the MDXX and DOX families, which can retain some of the pharmacological properties of traditional amphetamines.
In terms of action, most psychedelics are serotonin receptor agonists, whereas most amphetamines are dopamine-norepinephrine releasing agents. There can however be overlaps, for example LSD has binding affinity to dopamine receptors as well as serotonin receptors, and MDMA is a releasing agent for serotonin, dopamine, and norepinephrine.