An array allows storing a collection of homogeneous data elements in contiguous memory locations and provides random access to elements. It defines a variable with a name and fixed size, where all elements are of the same data type. Arrays are commonly used to store lists of values and perform operations like sorting and searching algorithms. Bubble sort is a simple sorting algorithm that compares adjacent elements and swaps them if they are in the wrong order until the list is fully sorted.