Although they are both breakthrough therapies being studied to treat a variety of psychiatric conditions, ketamine and psilocybin are very different. Psilocybin is a "classic" psychedelic meaning it works on the 5HT2A serotonin receptors. Ketamine is a "dissociative anesthetic" that can illicit psychedelic-like experiences but it works primarily on the glutamate receptors called NMDA receptors.
These two also have very different legal statuses. Ketamine is a Schedule III drug that is FDA approved for use in pain and anesthesia and is currently a breakthrough therapy for treatment-resistant depression which means it can be used off-label in clinics. Psilocybin is a Schedule I illegal substance that also received breakthrough therapy designation with the FDA but can only be accessed through legal FDA clinical trials at this time.