Firstly, I believe there's a typo. The two first red lines make little sense with $myobject. I would expect the variable to be $newobject, as declared one line above.
What the first two red lines do is that they assign to the 'Apple' and 'Pear' keys of the object (which happens to be a hash ref) the parameters to the constructor. So for example if you then call
$obj = NewObject->new('red','green');
then the following equalities will hold:
$obj->{Apple} eq 'red';
$obj->{Pear} eq 'green';
This is because @_ is the array where a subroutine gets its parameters. For more about this, look at perldoc perlsub.
The second two red lines do the same thing only they use the fact that the shift method returns the first parameter and removes it from the @_ array. Look at perldoc -f shift