I need some context here. What kind of pin? Where?
I'll assume you are talking about some kind of a pin in a bone. You will not remove it, a surgeon will. Whether you need a cast afterward depends on what kind of pin it is. Ask the surgeon what the plans are.