Pit railway sat on by working dog (8)
I believe the answer is:
colliery
'pit' is the definition.
('colliery' can be a synonym of 'pit')
'railway sat on by working dog' is the wordplay.
'railway' becomes 'ry' (abbreviation for railway).
'sat on by' is a charade indicator (letters next to each other).
'working dog' becomes 'collie' (collie is a kind of working dog).
'ry' after 'collie' is 'COLLIERY'.
(Other definitions for colliery that I've seen before include "Mining complex" , "Pit" , "Coalmine and surrounding buildings" , "Coal mine" , "Where a coalminer goes to work" .)