Since I work as a software engineer for my day job and telecommute, I spend a lot of my time at my desk, in front of my monitor. In order to write, as a result, I need something to get me out of that work mindset. What this is, however, can vary.
It can be as simple as writing a scene by hand in a notebook with fountain pen, instead of being on the computer as I am at work. Or it can be taking my laptop to a coffeeshop and writing there, instead of being at my desk where I work. Or if I'm at my desk, it can be something like lighting scented oil that I wouldn't light while at work, to provide that subtle cue that I'm not at work and should be in my writing mindset.
Whatever it is, I need something to mark that I'm writing now, and not in my work mindset at my work desk.
(Music also helps; I find specific types help me write specific scenes. But I listen to music while coding, too, so it's not sufficient to kick me into writing mode on its own.)