Yes and no. Basically When I write something, I approach my agent. My Agent then takes my manuscript and shops it around to publishers. Then we work out a deal, like $10000 for the first book, on the condition I write 1 more. In other words, they pay me up front for two books, but I only gave them 1, so now I owe them another by a set date. If I don't honor that, then I have to pay them back the $10000. This is called a book deal.
My contract will only cover whatever number of books we agreed to in the book deal, then after that I'm a free agent again. Sure, I can go to the same publisher again, but it's always best to let my Agent shop it around for the best deal. After all, I could be offered $20000 to do 6 books in 10 months (ouch!) with one publisher, or $15000 for 3 books over 18 months, by another. The second deal might pay less, but I get the money up front in any case and if I finish early, I can just start writing again. If I didn't finish all of the books, for any reason - then I would have to pay the money back and would have basically done all that work for nothing.