The closest subway station is Spadina on the Bloor-Danforth line.
From Union, take the University line up to St. George and then go downstairs to the Bloor trains one station west to Spadina.
Alternatively, you can get on the Yonge trains, go up to the Bloor-Yonge station, and change to the Bloor-Danforth line and take the train west to Spadina.
(If you want, you could also walk from St. George to Madison. It isn't really far

)