Homophones are words that sound alike, may have the same spelling, but differ in meaning.
Wonder means doubt, curious, surprise, astonishment, amazement, etc.
Wander means to stroll, roam, walk, stray, etc.
I wonder what Tom was doing all these years.
We wondered at Jack’s intelligence for his age.
The kid was found wandering alone in the park.