Discrete: usually from the table. Add the probabilities in a cumulative fashion from lowest number. Usually you need to cross 0.50 to obtain the median. Say you got 0.54 for X = 4; 4 is your median. IHowever, if the probability is equal to 0.5, then find the midway point between the two adjacent values of the variable. I.e. you got 0.5 for X=4, and 5 is the next number, median is 4.5.
Continuous: need to evaluate an integral, set up so that the lower limit is the lower value of the CRV and use m as your 'median' value; integrate the Continuous RV from the lower limit to m, and equate this integral to 0.5. You'll get some value for m, that's your median. Note that for cumulative distribution functions (not on course but briefly mentioned in Essentials), you need to equate the function to 0.5 as it is a function of cumulative probabilities of the probability density function.
Hope that helps!