When you reach the end of a book, a dialogue will pop up which lets you choose to either keep the book in "My Books" or finish it. If you finish the book, you can rate it and write a review and the book will then be moved to "My History".
Of course you can also move a book to "My History" from the book menu. Either click on the three dots (More) under the cover on the book page and choose "Move to My History" or reach the menu to do this by long pressing a book cover anywhere in the app.
You can only move books to "My History" that you have started listening to or reading in the app.