Who wrote the books inside the bible?

Different people wrote different ones. Exactly who wrote what depends on who you ask. In general, each book has a "traditional" author and at least one other candidate (whose name we may not know).
One reason for this is that some scholars refuse to believe in, for example, prophecy. So a book that contains a section foretelling the future "can't" have be written by the guy whose name is on it, it "must" have been written by someone after the events described in it had already happened.

Wikipedia has a pretty good article on this; I'm going to refer you there (look in the Related Links) instead of retyping it all here.
Different people wrote different ones. Exactly who wrote what depends on who you ask. In general, each book has a "traditional" author and at least one other candidate (whose name we may not know).
One reason for this is that some scholars refuse to believe in, for example, prophecy. So a book that contains a section foretelling the future "can't" have be written by the guy whose name is on it, it "must" have been written by someone after the events described in it had already happened.

Wikipedia has a pretty good article on this; I'm going to refer you there (look in the Related Links) instead of retyping it all here.