Drinking a lot of water to stay hydrated can help relieve constipation and help keep your stools soft and easy to pass.
Being hydrated is one main cause of constipation so if you're having trouble pooping and are constipated then increasing your water intake can and does help you poop.
Drinking plenty of water will also make you pee a lot but you need to stay hydrated and water is the best drink for staying hydrated with.
You can also take some laxatives to help get your bowels moving or drink prune juice or eat some prunes and increase your fiber intake.