Was thinking of these travels, the other day, when a radio programme I listen to ("PM", BBC Radio 4) started talking about hitch-hiking. Stories of times past, mostly. It was repeated that we just don't do it much, any more. (Boils down, if I may paraphrase, to the fact that drivers don't trust the HHikers, while HHikers don't trust the drivers.)
What more to say about York? (Assuming you get to read this before departing...) If you're arriving at the railway station, find where the Walls raise up from the river, a short walk to the left, consider walking around that half until you hit the river again. Then you cross the bridge and head towards Clifford's Tower (just over the bridge there's steps down to the riverside park where you can walk diagonally across to it, rather than continue on the road-side pavement... I know sometimes there's a gallopers/round-about in that area, as well). I think there's an entrance fee for the tower (but you can walk around the top of the motte/mound, at the foot of the keep itself[1]), but I'm fairly sure that the nearby Castle Museum (previously a Victorian debtors/women's prison) is free-entry.
From there, you can walk through the centre of York towards the Cathedral, or bear to the right a bit (I'm sure there's signs) to Coppergate and the Jorvik Viking Centre (definite entrance fee... but the visitor's shop has done some nice bottles of mead and some seasonal oakleaf wines and is free to enter, if not to purchase from) before heading on towards the Cathedral. I can't think how to describe how to find The Shambles, a very traditional narrow street with overhanging half-timbered buildings that's very much an attraction (and at the height of the tourist season, I've seen guys dressed up in Roman uniform standing or wandering around the area). From the Cathedral, you can head back towards the river, to cross back towards the station. On the right, just before the river, there's the Yorkshire Museum and Gardens off to the right.
If you've got a bit more time (or have skipped some of the more ancient stuff, or are just a speedy walker) on the railway station side of the river, a short (but not immediate, say 5 minutes) walk to the north west is the National Railway Museum (free entry!), which you could spend as little as half an hour in, or as much as half a day, depending on your interest in the subject. I think they still have everything from a replica of Stephenson's Rocket, to a Japanese Bullet-Train. Including, last time I was there, but hidden away in a nondescript modern-construction 'shed' beyond the main hall in the western grounds (across/under the main road that passes through the site) a Harry Potter-themed engine (and some others of probably more worth) that some people would find interesting.
((If you're not starting/ending at the railway station, of course, you rotate this plan of travel around according to where you start/end at...))
It's a longer walk (too long to subject you to, to be honest), but I quite like York Racecourse at Knavesmire, at the southern end of the city. When there are no races on, that is. And I can't really tell you why I find it so fascinating.
And I know I'm missing a lot of things (the river itself, including the possibility of boat trips/hire, cycle paths all over the place, various events that may well be on at the moment), but if you get to read this before you irrevocably exit the city it may give you at least some sort of idea. But as it's quite late, today, and you may be moving on tomorrow, or at least not getting around to read this before you solidify your plans.
[1] Honestly, if you're really into castles, Conisbrough Castle is, while significantly ruined around the curtain walls, a much larger and well-appointed keep, not to say mention its modern restoration of roofing and flooring for visitor experience. There's not much more regarding important tourist-attractions in that area[2], though, so unless you find yourself passing by, it's not something I'd expect you to get to.
[2] Given the Earth Centre is currently closed. Which might have been of interest if you're into Self Sufficiency. Very nice conference facilities it had, too...