Where did people urinate/defecate during the middle ages?
Depends where, and what class of people. While outhouses and latrines were common for most folk, working toilets have been around for a very long time, predating the middle ages (keep in mind, during the middle ages, Europe was behind much of the world in technology) Parts of what are now India and Pakistan had working flush toilets and sewage systems. The Romans and Egyptians had forms of water toilets. While these were mostly limited to the upper classes, they did exist and were in use over a thousand years before Europe began adopting flush toilets. In Europe, the modern flush toilet was introduced in the 1590’s, but did not become widespread until the 1800’s.