Does it hurt to get an ileostomy done?

Some. An ilesotomy is a bowel surgery and will require incisions of some sort (laparoscopic versus open procedure). You can expect to have some degree of postoperative pain - usually that is controlled well with iv, im, and/or oral medications.