It's easier than it looks from the outside. Even I can do it!
You write your query, and contact agents and publishers, using your real name. You use your real name on any contracts. Your manuscript has "by Author Penname" on its cover page (novel, script) or first page (short story), and the sluglines which number its pages have your penname's surname and your real surname in parentheses: Twain (Clemens), FINN, 125.
Maryn, hoping that made sense