Firms compete for clients, creating distributions of market shares ranging from domination by a few giant companies to markets in which there are many small firms. These market structures evolve in time, and may remain stable for many years before a new firm emerges and rapidly obtains a large market share. We seek the simplest realistic model giving rise to such diverse market structures and dynamics. We focus on markets in which every client adopts a single firm, and can, from time to time, switch to a different firm. Examples include markets of cell phone and Internet service providers, and of consumer products with strong brand identification. In the model, the size of a particular firm, labelled i, is equal to its current number of clients, ni. In every step of the simulation, a client is chosen at random, and then selects a firm from among the full set of firms with probability pi=(niα+β)/K, where K is the normalization factor. Our model thus has two parameters: α represents the degree to which firm size is an advantage (α>1) or disadvantage (α<1), relative to strict proportionality to size (α=1), and β represents the degree to which small firms are viable despite their small size. We postulate that α and β are determined by the regulatory, technology, business culture and social environments. The model exhibits a phase diagram in the parameter space, with different regions of behaviour. At the large α extreme of the phase diagram, a single dominant firm emerges, whose market share depends on the value of β. At the small α extreme, many firms with small market shares coexist, and no dominant firm emerges. In the intermediate region, markets are divided among a relatively small number of firms, each with sizeable market share but with distinct rankings, which can persist for long times before changing. We compare the model results to previously published empirical data from a broad range of Japanese industries, and find good agreement with a central statistical result relating the standard deviation of market share changes to the value of the market share before the change.