The concept of Moshiach ben Yosef (literally, "the anointed son of Joseph"), while not a major concept, is well-established in Judaism, being mentioned in many sources, including the Talmud. At the same time, like many of the more esoteric ideas surrounding the coming of the messiah, it is a very obscure concept and open to a wide range of interpretations. Unlike the belief in Moshiach ben David, which is a core principle of Judaism and has a clear legal definition, the concept of Moshiach ben Yosef is agadic, i.e. non-legal, and it can be understood to be entirely allegorical or as only one of several possible courses of events in the coming of the messiah.
Virtually all sources see Moshiach ben Yosef as a (possible) precursor to Moshiach ben David. Thus, for example, Rav Saadia Gaon (Emunos v'Deos 8) presents Moshiach ben Yosef as a necessary precursor to Moshiach ben David only if the Jewish people have not yet repented.
Many sources appear to view Moshiach ben Yosef as referring primarily to an early stage of the redemption in which events will take place in a non-miraculous manner, to be replaced ultimately by the coming of Moshiach ben David, when the redemption will be completed through miraculous events. (This appears to be the view of the Vilna Gaon presented in the work, Kol HaTor.) Many of the sources that discuss Moshiach ben Yosef in detail (like Kol HaTor) are heavily kabbalistic, so interpretation by a layman like myself is difficult. One of the areas that is often unclear in many of these sources is whether the concept of Moshiach ben Yosef needs to be associated with an identifiable human being, or if it can be understood simply as a symbolic term for the earlier stages in the redemption, or possibly some middle ground, such as the righteous in each generation who teach and guide the people, preparing them for the ultimate redemption.
Rav Avraham Yitzchak Kook (d.1935) famously (and controversially) identified the secular Zionist movement with Moshiach ben Yosef, who is to lay the groundwork for the true redemption and then die and be replaced by Moshiach ben David. It is difficult to say how Rav Kook would have viewed the secular State of Israel , but he might well have extended this identification to the State as well.
In short, there is no single, straightforward interpretation of the Moshiach ben Yosef concept; rather there is a range of ideas, all of which are tentative. This is true of many of the details of the process of the coming of the redemption, we will not know what these prophecies and teachings really mean until after the event.
Originally written in response to a question on an on-line forum.