Yes, its possible to buy train tickets on the day of travel at the station. This flexibility makes spontaneous trips to that ramen place in Kyoto as easy as an impromptu Friends marathon. However, for popular routes or during peak times, its advisable to reserve your seat in advance to avoid any Ross-and-Rachel-esque we were on a break situations with your planned itinerary.