Constipation

Really need help got it of hospital yesterday with constipation. And got a stoll softer but it's takes 48 to work and I'm in pain my belly hurts not a movement all day.. Any recommendations