Bar Graph : In Bar Graph, bars with equal width are used either horizontally or vertically with equal spacing between each other. Length of bars represents the given number which is being referred to in the question.
Histogram : The graphical representation of data of class interval is called as Histogram.
Or in other words,
A Histogram is a bar graphs that shows data in intervals.
Or we can also say that:
A Graph which represents grouped frequency table is known as Histogram
Since there is no gap between the classintervals, so there is no gaps between the bars of histogram too. and height of bar represents the frequency of class interval.
Below two diagram further illustrates the distinction between Bar Graph and Histogram:

