If permitted by the transit provider, rider can "flag" down a bus at any safe point along the route (generally places that allow the bus to pull out of the traffic lane or by street intersections) to board a bus. Areas that permit flag stops are generally suburban and rural areas that don't have regular bus stops.
Rail lines (other than streetcars) that practice flag stop is basically implementing a stop policy for most buses (which is not considered flag stop). It means the train will stop only if the passenger is visible (or has activated some kind of lights or other indicators) to the train operator at the station platform, or when a passenger onboard has requested stop with a stop request cord, strip, or button, or by telling the train conductor. If no one is visible and no body has requested stop, the train will skip the station.
Rail agency may only practice flag stop at certain low ridership station at certain times (Metra Electric), or at all stops at all times (VTA Light Rail).
Streetcars generally operate like buses so this policy applies but not labeled flag stop.