i bought a book.=> simple past. You bought a book at a definite time in the past such as yesterday you went to a book store and bought a book.
i have bought a book => present perfect. Your action of buying a book is recent. Maybe you just ran into a friend outside a bookstore today or just now, and you just told him/her about what y