Yes, the train station at FCO is right at the airport.
There are two(?) trains per day that go directly from FCO to Florence. But unless you can catch one of those, you'll have to take the train from FCO and connect at one of the Rome stations to get to Florence - there are plenty of trains to Florence via Rome.
If you don't care much about the cost, buy your tickets at the last minute for the next train. Otherwise, you have to guess how long it will take to get through immigration in FCO, how long bags will take to arrive, whether your flight might be late, etc. If you really care about the cost, book a cheap ticket in advance as far ahead as you can (a few months) and plan a big delay of 3-4 hours before you would get the train to Florence, to give yourself some padding in case you are late flying in or something.