First, degrees are converted to decimal degrees -
"Degrees + (Minutes + Seconds/60)/60.
Then, decimal degrees are converted to radians -
"Degrees * Pi/180". If we are talking about Earth coordinates, we also have to consider a sign.
For North latitude and East longitude, it is a plus,
for South latitude and West longitude, it is a minus.
To convert radians back to degrees, divide 180 by Pi and multiply the result value by radians number.
You'll get a real number, which in the integer part is a number of degrees. To get the minutes, you'll need to multiply the fraction by 60 and get the integer. The last operation fraction multiplied by 60 and rounded to the nearest integer is the seconds. Note: you may get 60 as a rounding result; in this case, you assume the number of seconds = 0 and increment minutes part (which again may become equal to 60).
The following calculator does this simple math for you: