Breadth-first search (BFS) is an algorithm for traversing or searching trees or graphs. It begins at a root node and explores all neighboring nodes at the present depth prior to moving on to the nodes at the next depth level. The key properties of BFS are that it visits all vertices and edges, computes connected components, and finds the shortest path between any two vertices in terms of the number of edges. BFS runs in O(n+m) time on a graph with n vertices and m edges.