Many writers want to use a pseudonym when they're changing genres. Or if they're too prolific. But let's say you want to use a pseudonym to reinvent a stalled career. When should you inform prospective agents about this decision? If you query them under your old name, advising them you're writing this latest work under a new name, wouldn't that defeat the purpose? On the other hand, if you reveal your true identity (and track record) only after they fall in love with the book, would they feel you'd committed a cardinal sin?
Well, using a pseudo to restart a flagging career is a hard one. The agent will know your sales history, as will the publisher, so generally that doesn't work out so well.
You always use your real name on any and all correspondence you engage in with agents, editors, and publishers in general. Once you've gotten past the agents, editors, etc., and are talking with a seriously interested publisher, then you're in the 'here's my pseudonym' territory.
If you want the book published under a pseudonym include that in your ms.. You use your first line on the ms. to show your real name, followed by contact info, ect., skip a few lines then your title, another line 'by', another line, and then your pseudo.