Why in some contexts does 走 mean "walk", but in others "go"?
There are really three words you need to figure out here: 走，去，離開。  去 usually means to go 'toward' a particular place, which is not my current location, or not the location of the topic of the sentence. This is NOT the same as English.  

As an example of the difference, in English, we say 'Go away' when we want someone to leave our immediate vicinity. In Chinese we cannot use 去 (unless you say 去你的, which is very rude, close to **** off); instead we must use 走(開). 離開 is more like 'depart', but has some overlap with 'leave' as well. It means to remove oneself from a specific place.  This sometimes overlaps with 走, but never with 去 (I think). 

走 means 'walk' in the sense that one's movement is on foot.  In sharp contrast with 去, there is no destination, so when one says 他走過市場, it means he walked by or through the market; what is his his destination? unknown; perhaps there is none.  

On the other hand if you say 他去過市場, it is quite different: "He once went to the market" Notice that 過 here is the aspectual particle, not the locative word 'through'.  This means 'He has been to (gone to) the market' His destination was the market, and this often has the sense that his purpose was to visit it; it is not unusual to see '去' translated as 'visit' because it means you went to a place for a purpose, perhaps just of being there.

走's overlap with 離開 and 'go' is often quite confusing.  For example, 他離開了 simply means 'he left some place', but 他走了, in addition to leaving some place, can also mean "He died."  In English, of course, we would say, "He's gone."  Yikes!