"Chain in, rail out" is the standard advice. However, if you search around r/Factorio you'll see there's debate about whether that's the best advice for beginners.
Chain both in and out is supposedly the foolproof method, and apart from stations, rail signals are just an optimization.
Though I've played a lot of Factorio, I've never really felt the need to dive deeply in to signals, and I'm happy to just use the foolproof method and leave more optimized solutions for those who need them.