Sam segmentation

Can anyone tell me what are the steps that I must know in detail to make SAM? And what are the starting steps?