Use of ethanol versus DMSO as a solvent
The alkene being reacted with hydrocyanic acid here goes by benzylideneacetone, or 4-phenylbut-3-en-2-one in the language of the IUPACians. But you shouldn't view this molecule as an alkene, you should view it as an "enone", or $\alpha,\beta$-unsaturated carbonyl. 



Enones are notable for having "regioselective" reactions where nucleophiles add to either the beta-carbon (via 1,4-addition, vinylogy chemistry) or the carbonyl carbon (via 1,2-addition, standard carbonyl chemistry) regions of the molecule. 



In your question, you see we have a 1,4-addition of $\ce{H+}$ and $\ce{CN-}$. (After cyanide attacks the 4-position, the proton adds to O, the "1-position", and the enol intermediate then tautomerizes to a ketone.) 

The choice of solvent can have some effect on influencing whether 1,2- or 1,4- addition dominates. Aprotic solvents can encourage 1,4-addition (conjugate addition) to be favored over 1,2-addition (carbonyl addition) (Source). 

Your ethanol is a polar, protic solvent because the hydroxyl is capable of hydrogen bonding or donating the proton (its Bronsted-Lowry acidity is about that of water, pKa 15.7 vs 16). DMSO is a polar, aprotic solvent because it does not contain hydrogens that can H-bond nor are (appreciably) acidic. Use of DMSO can encourage 1,4-addition (source). 

Simply changing the protic-aprotic nature of the solvent may not always be enough to effectively toggle the dominant regiochemistry between 1,2- and 1,4- addition motifs. It may depend on the other reaction conditions (such as temperature), the structural qualities of the particular enone substrate at hand, and the nature of the nucleophile. In the Hard-Soft Acid-Base Model, "hard" Lewis bases tend to add directly to the carbonyl (1,2) whereas "soft" Lewis bases tend to perform conjugate addition (1,4). For nucleophiles (Lewis bases) not on either extreme end of the hard-soft spectrum, changing the solvent type can sometimes be enough to change the regioselectivity.

I recommend you ask your professor whether there is a rule of thumb he wants you to use to determine the solvent's effect (such as "polar aprotic always gives 1,4"), or whether you should memorize specific examples (because there are many exceptions).