「彷徨う」means "wander around aimlessly because you are lost or don't know what to do or where to go." You can also write that like 「さ迷う」.
例文:
森の中を彷徨う。: (I/you/he etc.) wander through the forest.
彼は交通事故に遭い、病院で生死の境を彷徨った。: He had a traffic accident, and hovered between life and death at the hospital.
Hope this helped!