If work at home is new to you or you get too distracted, it helps a lot to give the day at home the same structure that you would have at work. Also, rituals that you maintain at home before you go to work can help to switch from home mode to work mode and back to off-hours mode.
How can this look like in practice?
Set your alarm.
Get up and get dressed (do not fall into the "in your pyjamas in front of the computer" trap!).
"Go to work" - Use the time you would otherwise spend travelling to and from work, walking around the block or other exercise.
Plan your working day including breaks:
You work during working hours.
In the break time you take a break - as long as planned (see also the Pomodoro Technique).
Also use the breaks to simply go out, get exercise or to actively use the time with the children or to have lunch with your partner. A great danger in the home office is that you hang around in front of the computer too much and move around too little. This is not good for concentration and health.
Call it a day when it's quitting time and you've worked your hours.
Tip: Set a timer for the individual phases so that you don't fall into one extreme or the other.