First entrants into a market can have a number of advantages if their product has a network effect or other lock-in mechanism.
If you are the second mover into a market, how do you win? Some approaches:
Build Something 10X Better or Much Cheaper
When Apple launched the iPod, and then the iPhone, it had 10X better products then existing MP3 players or cell phones. Similarly, most SaaS business have a large cost differential relative to the existing enterprise software model.
Go International First
As your competitor scales they will be so focused on the US market that they will be late to internationalization. For example, GroupOn bought CityDeal (a GroupOn clone) to get a faster position in the European market. I am guessing some international first movers will get bigger then their US competitors (and maybe end up buying the US version of the company). While I am not advocating becoming a cloning shop, sometimes going International first can give you an advantage as the first mover in international markets.
Play A Different Strategic Game (Your Strengths / Their Weaknesses)
Post-iPhone, Google was second to market with Android.
However, Google took the strategy of (1) opening up the OS for modification/customization by operators and handset OEMs, (2) widespread distribution (versus the more measured carrier by carrier deal with some market exclusivity of iPhone) and (3) maintaing the brunt of handset economics for carriers and OEMs.
Google fundamentally viewed the handset OS business differently from Apple (more as a distribution point & strategic asset for ads, search, maps, other apps) which meant it played a fundamentally different game from Apple. Its early products where crappier from a user perspective, but it grew much faster.
Blow Out Distribution To Lock In Share
In the early days of the Facebook platform, Zynga projected out the ongoing rise of LTV for social gaming users, allowing it to pay significantly more for user installs than its competitors. Once it had massive market share, Zynga cross promoted games it developed - effectively using its distribution to bootstrap more distribution. Zynga could then more or less copy competitors' games, launch a month later, but still win on market share via aggressive distribution.
This approach of blowing out distribution channels in a market share grab can be very effective if products are reasonably interchangeable from the customers perspective.
Sell While The Space Is Hot
Sometimes it is clear you lost as second mover, but the market is really hot for a brief period. Rather than raise a monster funding round and get locked in, it might be wise to sell while valuations for your niche are out of whack.
Wait For The First Mover To Get Bought (Or Kill Itself)
Alternatively, if your market is undergoing consolidation there are times when being the last independent company standing can be to your benefit. Acquirers often screw up mergers or destroy products.
Furthermore, your competitors may take themselves out via poor execution. For example Cisco's two early competitors were Synoptics and Wellfleet. The pair merged to form Bay Networks with the idea that the combined forces would outgun Cisco. Instead, the merger led to ongoing corporate infighting, factionalism, and cultural clashes, leading Bay to defocus on execution. This cleared the competitive arena for Cisco to become the huge player it is today.
You can follow me on Twitter here.