A bar or measure is used in writing music. It is a way of organizing the written music in small sections. Each bar is a small amount of time. Most music has a regular beat (or pulse) which can be felt. Each bar usually has the same number of beats in it. Music that feels like 1-2-3-4-1-2-3-4 will be divided into bars with four beats worth of music in each bar.
The bar line (or barline) is a vertical line written in the music which separates the bars.
At the beginning of a piece of music there will be a time signature. The top number shows how many beats there are in each bar. The time signature tells you how long each measure is.
A double bar does not mean "two bars". It is two single bar lines drawn close together. These are simply ways of visually dividing the music into sections. A double bar line can be written with one being thicker than the other. This double bar line shows the end of a piece of music.
If there are two dots on the left of the double bar line, this is a repeat sign. The player should go back to the beginning and start again. If the composer only wants the performer to repeat a section of the music, and not go back to the beginning, they can put in a "start repeat" sign. This is a double bar line with two dots on the right.
The first beat of a bar feels stronger than the others. When a conductor beats time, his hand (or baton) always goes DOWN for the first beat of the bar. This feels strong. The last beat of a bar is an "upbeat" because the conductor's hand always goes up.
Barlines have been used since around 1600.