Alike: Both "peril" and "risk" refer to the possibility of harm or danger.
Different: "Peril" specifically denotes an immediate and severe threat, while "risk" encompasses the likelihood and potential of danger occurring, often in a broader or more abstract sense.