1) generally you choose the supervisor & his lab/researches based on your interest, discuss potential topics, and see if the supervisor is willing to take you on that..
or it can be you have no specific topic but you have broad preference in that particular area, the supervisor will likely have idea/on-going research that needs another kuli..
the former is ideal, and the latter is common

2) from comp sci perspective: paper reading -> idea -> discussions w/ supervisor/others -> implementation -> gather results -> paper writing -> submission to conference/journal -> repeat...
when it comes toward the end, mash together all the research that you did into one thesis as a story, then explain your work to a panel of experts (might also be your supervisor own buddies

)..then they decide whether to give u that degree.
3) in the end, you need to figure out your actual purpose to do postgrad..and you have to be really honest with yourself
advancing your career? siok sendiri want add a Dr.? don't know what to do so keep studying? don't want to join the rat race so early? too much free time don't know what to do?
if it's related to academic track, yea, u will likely require that advanced degree..
if R&D, maybe so...just maybe slightly bump salary/job grade
other than that...it's likely gonna be "marketing"