Like many modern Thai towns, Hat Yai sprawls out all directions. However, most of the hotels and what little there is of interest to see in the city are within a few blocks of the railway station, so this is the area you want to be.
Hat Yai Map
Map data © OpenStreetMap contributors, CC BY-SA
Map data © OpenStreetMap contributors, CC BY-SA