Odense is located approx. 150 km from Copenhagen and it takes around 1 hour and 30 minutes by train directly from Copenhagen Airport to Odense Station.
It is possible to buy a train ticket at the airport or via DSB where the trains are marked "LYN" and are leaving every hour.