Most cubic surfaces contain 27 lines or less, but there are some which contain more. Indeed, those contain infinitely many lines, and are called ruled cubic surfaces.
Even more: these ruled cubic surfaces are defined by the lines: Let two points in space move along some curves in space; at each point in time, join the two points by a line; the ruled surface consists of all points on those lines.