Generally speaking, one is allowed on Yom Tob to cook food that he intends to use on Yom Tob. Thus, for example, it is permissible to bake, boil and fry raw food on Yom Tob in preparation for the Yom Tob meals.
One may not, however, squeeze oranges or other fruits on Yom Tob in order to prepare freshly-squeezed juice. If one wishes to serve or drink freshly-squeezed fruit juice on Yom Tob, he must squeeze the fruits before Yom Tob, even though the juice will not be as fresh as it would be if it were squeezed on Yom Tob itself. The Sages forbade squeezing fruits on Yom Tob out of concern that one may prepare large amounts of juice for the days after Yom Tob. Since Halacha allows food preparation on Yom Tob only for the purpose of eating on Yom Tob, preparing juice for after Yom Tob would constitute a Torah violation. To safeguard against this violation, the Sages forbade squeezing fruits for preparing juice on Yom Tob.
The one exception to this rule is the rare situation of a fruit juice that spoils after one day. Theoretically, if one wishes to drink on Yom Tob a fruit juice that would spoil if it is prepared before Yom Tob, then he may squeeze the given fruit on Yom Tob. Such cases, however, are very rare, particularly nowadays when we preserve fruit juices through refrigeration.
Summary: Although cooking is permissible on Yom Tob, one may not squeeze fruits to prepare fruit juice on Yom Tob; this must be done before Yom Tob.