For most dishes, the two are interchangeable. But for some extremely delicate recipes like soufflés or French onion soup, the superior heat distribution of a ramekin is necessary. The better heat distribution is due to two things: 1. Whereas custard cup are usually made from Pyrex or glass, ramekins are usually made from thicker materials like metal or porcelain that can absorb a lot more heat and spread it more evenly. 2. Custard cups usually have very angled sides, while ramekins’ sides are either completely vertical or just ever-so-slightly angled. The fact that ramekins are almost equally wide at every part aids with more even heating. So in short, you can always use a ramekin in place of a custard cup but often can’t use a custard cup in place of a ramekin.