Yes. If a candidate does not win the primary, he/she can run as a third party candidate or write-in in the general election (not runoff). HOWEVER, between ballot access issues (requirements/deadline to get on the ballot in each state) and the Electoral College, the process makes it near impossible to win. Essentially, the game is rigged to Democrat & Republican.
On the other hand, a primary losing candidate may still have strong enough appeal in the public eye. In this case, he/she can run as a third party candidate or write-in, be a spoiler, and change the outcome of an election.
Think Ross Perot and Ralph Nader in recent elections.
Some states have "sore loser" laws prohibiting someone from getting their name printed on the ballot for any party if they previously ran and lost in that state's primary/caucus. However, in practice most of these have not been applied to presidential primaries. There are two exceptions, South Dakota and Texas. A person losing the Republican presidential primary in Texas would not be allowed to have their name printed as the Libertarian candidate for that same general election.