A bar is a segment of time defined by a given number of beats providing a reference point in a piece of music.