What is the grammar behind "上去“ in 听上去不错? An English translation of  "听上去不错" is "sounds good".

I understand ”不错“ as "not bad", i.e. "good" (the literal expression "not bad" is quite common in Britain and has the same meaning).

But I don't understand why and how "上去" function in this saying. Can someone please explain?

In more detail, I understand the individual meaning of these characters but not why together, with 听, they equate to "sound" in the phrase "sound good".
上去 here functions as preposition (to),  in this case, the object 'words' is omitted

听 (listen) + 上去 (to) 


(听上去)不错 = "It is not bad (listen to it)."


Example of other [verb +上去] phrases


看上去 (look at it)
摸上去 (touch on it)


You can use 起来 instead of 上去 in this sentence
- (听起来)不错 = "It is not bad (listening to) it. "