The cable car you have in mind is the Aiguille du Midi cable car. It goes all the way to the summit… of the Aiguille du Midi, not to the Mont Blanc itself. It's very close to the mont Blanc and you can take another cable car over the Mer de Glace to the Pointe Heilbronner, in Italy, to get more views of the massif. That's also where the “Step into the void” attraction is located. The cable car operates year-round but it frequently stops depending on weather conditions (especially the wind).
Going to the mont Blanc itself is a completely different matter. It's not deemed particularly difficult as far as mountaineering goes but you cannot go there by cable car or treat it as a casual hike. You need special equipment, experience moving over ice or in exposed areas and, realistically, a guide. It takes at least two days, with a night in a mountain hut. At 4000m, physical effort is also much harder and relatively small distances can become a challenge.
Do not even think of attempting it if you have no experience of mountaineering. It's also more common to climb it in the summer, as winter weather and short days make everything more difficult and dangerous (it's not impossible: people do it and people have died doing it).
The train (“Tramway du mont-Blanc”) is not exactly at the same location as the cable car and does not go all that high, although it can be a nice excursion too. It's a common starting point for a climb of the Mont Blanc itself but everything I wrote before applies.