Working from home has its perks - we get to choose when to work, where to work, and how much work we do and still get enough time to spend with our family. However, there are disadvantages too, and one of which is the common problem experienced by many. It's not just you - the majority of people who work from home may struggle concentrating, mainly because we don't have a boss who is constantly looking over us. I found myself in your shoes a couple of months ago, after giving birth - with the baby and everything that's going on, and I told myself, this has got to stop.
I used to work whenever I want, and wherever I want - literally. I have an iPad and a laptop, and if I felt like working in my bedroom, I would, but I figured it doesn't help. I'm being too comfortable, and with that, I tend to fall asleep easily, which is a bad thing. Which is why I figured I have to setup a home office . Have a separate room, or at least a corner where you'll work and stay there. This way, you'll stop feeling too comfortable, allowing you to concentrate and do your work.
Setting a work schedule is the next best thing that you can do at this point. We know that working from home gives us the freedom to work whenever we want, but if you set a work schedule, you'll be motivated to hit your goals and finish your work for the day.  This doesn't mean that you're tied up to your schedule - feel free to change often, if you find the need to. It doesn't matter what your schedule is - what matters is that you stick to it.
Some experts would say to get dressed up for work - although I don't normally practice this one, I make sure that I at least get out from my jammies.
Since you've mentioned that you get distracted with social media, games, etc, it's best to separate your work with some of your gadgets. For instance, I make sure that I turn my phone off, or set to do not disturb so Facebook notifications won't pop up on my phone. I also make sure that I close Twitter, Facebook, Pinterest, and YouTube whenever working! As long as it's within my scheduled work hours, those sites would have to wait. If you're playing console games, try and make sure that your console is not in the same room where you work.