Completely landlocked towns, especially in the medieval period, are actually quite rare, although it could be the case in smaller villages. In these situations, it was relatively common to dig pits for midden heaps, and then level these off and bury them when they grew too large.
In England at least, the water table has changed considerably since the medieval period, and there were considerably more marshy areas. Modern Stafford was founded as a prominent productive site specialising in pottery, butchery and baking for 10th Century Mercia and is an interesting example of urban waste disposal. The area of the the burh dedicated to pottery production is littered with vast numbers of pottery sherds, which indicates that wasters and mis-fires were simply discarded in piles next to the kilns. The area to the immediate north-east of the Anglo-Settlement used to be swamp, however, and excavations there in the 1970s found enormous quantities of animal bones, mostly cattle but also game, where refuse from the butchers had simply been chucked in the marshes.
While you wait for a more tailored answer, here are a couple of previous comments you or others may find of interest:
/u/Flubb on medieval London why did medieval people put up with so much filth in their city streets? IF they didn't have the resources for modern plumbing, couldn't they at least hire armies of people to cart away waste?
/u/Dashukta on medieval England People used to throw their shit in the street in big cities in Middle Ages?