In the present work comprehensive theoretical and experimental investigations of the self-trapping of a light beam in a photorefractive medium are performed and presented in detail. It is shown that self-trapping of a laser beam due to self-interaction of the propagating light wave with the nonlinear medium occurs under the condition of well balanced concurrence of the effects of diffraction and nonlinear focusing. The nonlinear change of the refractive index, which determines main properties of the generated waveguiding structure, is examined in a prospective polymeric medium based on polymethylmethacrylate (PMMA) with a high concentration of phenanthrenequinone (PQ) molecules. The photoinduced change and formation of structures in the PQ-PMMA material is generated by the laser light itself due to the PQ-photoattachment to the polymeric matrix and the formation of a photoproduct. The optimization of the PQ-PMMA composition is carried out with the help of recording and investigation of diffraction gratings. The holographic relaxation technique allows to establish the conditions for achieving high nonlinear modulations of the refractive index necessary to generate the self-trapping.