The terms bear and bull are applied when the performance of an asset(s) or market holds a pattern for either a few months or changes 20% or more from a recent peak or trough. When this behavior is noted, it becomes an official bear or bull market.
When stock prices decline, it triggers a bear market, while an increase triggers a bull market. Bull markets indicate the market is rising and is tied to a sound economy, while a bear market indicates a reclining market or economy.
While the true origins of the terms are disputed, there are two versions that tend to be the most likely linked to their use today, historical and metaphorical.
Historical
The historical version is based on the sale of bearskins. Often a middleman involved in the sale would sell the skins before delivery, basing the price on speculation the price would drop. These middlemen were called bearskin jobbers, or bears for short. Because they would undersell the skins, the term bear was used to describe a downturn in the market.
Although bulls were not involved in this process, during this same period in history, bull-and-bear fights were quite popular. Because the bull is in opposition to the bear, the term bull was used for an upward market. This can also be tied to the metaphorical explanation, with the upward bullish attack of the horns and the downward bearish motion of the paw.
Metaphorical
This explanation ties the terms to a metaphor for the upward and downward action of the market. When a bear attacks, it swipes its paw downwards and when a bull attacks, it thrusts its horns upwards. Hence, a bear market is a downward trend, while a bull market is an upward trend.