It is a mathematical explanation of the disturbance prepared by a ray. For a string, the wave function is a distance for sound rays. It is a density or pressure fluctuation while for light waves it is electric / magnetic field.
Now let us take a one dimensional wave traveling with reference to x-axis. During ray motion, a particle with equilibrium position x is displaced some distance y in the direction perpendicular to the x-axis. In that part y is a function of position (x) and time (t).