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 result value by radians number.
You'll get real number which integer part is a number of degrees. To get minutes part you'll need to multiply fraction by 60 and get integer part. Last operation fraction multiplied by 60 and rounded to nearest integer is the seconds part. Note: you may get 60 as rounding result, in this case you assume number of seconds = 0 and increment minutes part (which again may become equal to 60).
The following calculator does this simple math for you: