Spatial solitons occur when nonlinear effects counteract diffraction, allowing the electromagnetic field to alter the medium's refractive index and maintain a stable structure during propagation. This creates a scenario akin to graded-index fiber, where the soliton remains confined and retains its shape. Temporal solitons, on the other hand, involve sending spatially confined pulses that maintain their shape due to nonlinear effects balancing dispersion. These temporal solitons were the first to be discovered and are commonly referred to simply as "solitons" in the field of optics. Understanding both types is crucial for advancements in optical communication and related technologies.