Patients with recurrent or refractory solid tumors, including CNS tumors, are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) Patients with recurrent or refractory solid tumors, including central nervous system (CNS) tumors, are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or in patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) Diagnosis: \r\n* Part A: Patients with recurrent or refractory solid tumors, including lymphoma and CNS tumors, are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG)\r\n* Part B: Patients with recurrent or refractory high grade glioma (World Health Organization [WHO] grade III/IV) including disseminated tumors (excluding diffuse intrinsic pontine glioma [DIPG]), not requiring surgical resection; patients must have had histologic verification of malignancy at original diagnosis or relapse\r\n* Part C: Patients with recurrent or refractory high grade glioma (WHO grade III/IV) and requiring surgical resection (excluding DIPG and disseminated tumors), who in the opinion of treating physicians, are medically stable to receive 3-4 doses of selinexor (8-10 days of treatment) before undergoing surgery without compromising the success of the procedure; note that if, in the opinion of treating physicians, current symptoms necessitate surgery before 3-4 doses will be able to be received, surgery should not be delayed to administer selinexor, and the patient would be ineligible for protocol therapy Patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) Patients with recurrent or refractory solid tumors, including CNS tumors and lymphoma, for which no standard therapy is available are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) PHASE I (STRATUM 1): Patients with a histologically confirmed diagnosis of a primary CNS tumor that is recurrent, progressive, or refractory; all tumors must have histologic verification of HGG, medulloblastoma, CNS embryonal tumor (NOS), ependymoma, or ATRT; patients with low-grade gliomas are excluded Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines Subjects must have had histologic verification of malignancy at original diagnosis or relapse, except in subjects with optic pathway gliomas, or subjects with pineal tumors and elevations of serum or cerebrospinal fluid (CSF) alpha-fetoprotein (AFP) or beta-human chorionic gonadotropin (HCG) Ependymoma (World Health Organization [WHO] grade II) or anaplastic ependymoma (WHO grade III) that has relapsed or become refractory to standard therapy; patients must have had histologic verification of their malignancy at original diagnosis or time of recurrence Part A: Patients with recurrent or refractory solid tumors are eligible, excluding central nervous system (CNS) tumors; patients must have had histologic verification of malignancy at original diagnosis or relapse Part B: Patients with recurrent or refractory osteosarcoma are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse Part A: Patients with recurrent or refractory non-CNS solid tumors are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except patients with extra-cranial germ-cell tumors who have elevations of serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG); patients in part A cannot have CNS metastases Part B: Patients with recurrent or refractory CNS tumors will be eligible and must have a histological verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with CNS-germ cell tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-HCG Diagnosis: Histologic verification at either the time of original diagnosis or relapse of neuroblastoma. Patients must have had histologic or flow cytometric verification of the malignancy at relapse Patients with recurrent or refractory solid tumors, including central nervous system (CNS) tumors or lymphoma, are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) Subject has histological verification of tumor either at the time of diagnosis or recurrence. Subjects with DIPG are exempt from histologic verification if they have typical Magnetic resonance imaging (MRI) findings of DIPG The target tumor is limited to neuroblastoma; patients must have had histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines at the time of initial diagnosis Subjects must have had histologic verification of neuroblastoma at original diagnosis or relapse Patients with refractory or recurrent solid tumors for which there is no standard therapy are eligible; patients must have had histologic verification of malignancy at original diagnosis or at the time of relapse Subjects must have had histologic verification of malignancy at original diagnosis or relapse; all subjects with relapsed or refractory solid tumors are eligible including primary or metastatic CNS tumors; in the case of diffuse intrinsic pontine glioma (DIPG), or optic pathway glioma, imaging findings consistent with these tumors will suffice without the need for biopsy for histologic verification Patients must have had a previous histological verification of a solid tumor at the original diagnosis and/or recurrence including brain tumors; for patients with brain stem gliomas and optic pathway tumors, the requirement for histological evaluation may be waived; the patient’s disease must be considered refractory to conventional/standard therapy, or a disease for which no conventional therapy exists and is progressive Patients must have a diagnosis of neuroblastoma verified at diagnosis, or at the time of relapse by histology and/or demonstration of clumps of tumor cells in bone marrow with elevated urinary catecholamine metabolites; patients with non-neuroblastic MIBG avid tumors are also eligible including but not limited to paraganglioma and pheochromocytoma Patients with relapsed or refractory solid tumors (excluding primary central nervous system tumors) are eligible. Patients must have had histologic verification of malignancy at original diagnosis or relapse. Patient must have a documentation of prior diagnosis of NB or ganglioneuroblastoma either by histologic verification and/or demonstration of tumor cells in the bone marrow with increased catecholamine levels Diagnosis: patients with recurrent/refractory medulloblastoma (MB), atypical teratoid (AT)/rhabdoid tumors (RT) or ependymoma involving the brain and/or spine at original diagnosis or relapse; they must have histological verification at diagnosis and/or relapse; patient must have presented with these tumors in the posterior fossa (PF) or relapsed in the PF Diagnosed with neuroblastoma either by histological verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines Diagnosis: Histologic verification at either the time of original diagnosis or relapse of neuroblastoma. Relapsed/refractory neuroblastoma with original diagnosis based on tumor histopathology or elevated urine catecholamines with typical neuroblastoma cells in the bone marrow Phase I: Patients must have histologic verification of a solid tumor or lymphoma malignancy at diagnosis for which there is no standard curative anti-cancer treatment or treatment is no longer effective and must have received ? 1 prior line of therapy. Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines Subjects must have had histologic verification of a malignancy at original diagnosis or relapse; all subjects with relapsed or refractory solid tumors are eligible, excluding CNS tumors PRE-REGISTRATION: At least one documented histological verification of solid tumor diagnosis. Can be from original diagnosis or more recent. Stratum 1: Recurrent or refractory primary malignant central nervous system (CNS) tumor patients \r\n* Patients with a histologically confirmed diagnosis of a primary malignant non-brainstem CNS tumor (excluding DIPG patients) that is recurrent, progressive, or refractory; all tumors must have histologic verification at either the time of diagnosis or recurrence except patients with marker (+) CNS germ cell tumors Patients must have had histologic verification of AML at original diagnosis Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines Patients must have had histologic verification of one of the malignancies listed below at original diagnosis or at relapse \r\n* Primary strata\r\n** Wilms tumor\r\n** Rhabdomyosarcoma\r\n** Neuroblastoma\r\n* Secondary strata: miscellaneous CD56-expressing tumors:\r\n** Pleuropulmonary blastoma\r\n** Malignant peripheral nerve sheath tumor (MPNST)\r\n** Synovial sarcoma Patients must have had verification of the malignancy at relapse, including immunophenotyping to confirm diagnosis Diagnosis: \r\n* Phase 1 (Part A)\r\n** Solid tumors (Part A1): patients with relapsed or refractory solid tumors including central nervous system (CNS) tumors without bone marrow involvement are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG)\r\n** Ewing sarcoma or peripheral primitive neuroectodermal tumor (PNET) (Part A2): patients with relapsed or refractory Ewing sarcoma or peripheral PNET without bone marrow involvement will be eligible for Part A2 if there are no available slots on Part A1; these patients will be enrolled at one dose level below the dose level at which patients on Part A1 are actively enrolling, or at the starting dose level (dose level 1) if dose escalation has not yet occurred; patients must have had histologic verification of malignancy at original diagnosis or relapse\r\n* Phase 2 (Part B)\r\n** Ewing sarcoma or peripheral PNET: patients with relapsed or refractory Ewing sarcoma or peripheral PNET are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse\r\n* Phase 2 (Part C)\r\n** Acute lymphoblastic leukemias (ALL): patients must have 2nd or greater relapse of pre-B ALL or T-cell ALL; patients may not have refractory disease\r\n** Patients with ALL must have had histologic verification of the malignancy at the most recent relapse, including immunophenotyping to confirm diagnosis Patients must have had histologic verification of malignancy at original diagnosis or relapse; all patients with relapsed or refractory solid tumors or anaplastic large cell lymphoma (ALCL) are eligible except for patients with primary or metastatic central nervous system (CNS) tumors or patients with primary cutaneous ALCL Patients must have had histologic verification of the malignancy at original diagnosis or at the time of recurrence Patients must have had histologic verification of malignancy at original diagnosis or relapse Patients must have had histologic verification of neuroblastoma or ganglioneuroblastoma or demonstration of neuroblastoma cells in the bone marrow with elevated urinary catecholamines (i.e., > 2 x upper limit of normal [ULN]), at the time of initial diagnosis Patients must have relapsed or become refractory to conventional therapy, with a regimen including some combination of high dose methotrexate, doxorubicin, cisplatin, ifosfamide and etoposide; and have had histologic verification of osteosarcoma at original diagnosis or at the time of recurrence Patients must have had histologic verification of the malignancy at original diagnosis; patients must have histologic verification of recurrent Hodgkin disease at the time of relapse; no additional biopsy is required for patients with primary refractory disease (i.e. no prior CR) Patients must have histologic verification of malignancy; histologic confirmation for patients with optic pathway gliomas will not be required Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines. Patients must have had histologic verification of osteosarcoma at original diagnosis or relapse Patients must have had histologic verification of solid tumor, including lymphomas, at original diagnosis or relapse except in patients with intrinsic brain stem tumors, patients with optic pathway gliomas, and patients with pineal tumors and elevations of serum or cerebrospinal fluid (CSF) alpha-fetoprotein or beta-human chorionic gonadotropin (HCG) Patients must have had histologic verification of osteosarcoma at original diagnosis Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamines. Solid tumor, including central nervous tumors, that is recurrent or refractory to standard therapy or for which standard therapy is not available; all research participants must have a pathologic diagnosis either from their initial presentation, or at the time of recurrence or progression; the requirement for histologic verification may be waived for patients with brainstem glioma and optic pathway glioma ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Patients with recurrent or refractory solid tumors (including non-Hodgkin lymphomas, histiocytoses [e.g. Langerhans cell histiocytosis (LCH), juvenile xanthogranuloma (JXG), histiocytic sarcoma], and central nervous system [CNS] tumors) are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-HCG Diagnosis: histologic verification at either the time of original diagnosis or a previous relapse of high risk neuroblastoma. Diagnosis: histologic verification at either the time of original diagnosis or a previous relapse of high risk neuroblastoma. Diagnosis: Histologic verification at either the time of original diagnosis or relapse of neuroblastoma or medulloblastoma. Patients must have a diagnosis of neuroblastoma either by histologic verification of neuroblastoma and/or demonstration of tumor cells in the bone marrow with increased urinary catecholamine metabolites Patients must have histologic verification of osteosarcoma at initial diagnosis or relapse Diagnosis: patients must have a diagnosis of prostate cancer by histologic verification and a hypoechoic lesion seen on ultrasound