A dam is usually specifically designed to impound water behind a wall, whilst a weir is designed to alter the river flow characteristics. A common distinction between dams and weirs is that water flows over the top (crest) of a weir or underneath it for at least some of its length.
A weir is a barrier across the horizontal width of a river that alters the flow characteristics of the water and usually results in a change in the vertical height of the river level.