We just got back from doing this as well. Thanks to all the suggestions here I had a number of options in mind though in the end there was a shuttle from the ship to Blankenberge. They had announced that there would be a shuttle into "town" the night before but were not clear as to which town and from where. We initially did mistake getting right off the ship and getting on the shuttle to the port terminal thinking that might be where we would catch the shuttle into town, but while on that first bus I noticed a row of buses lined up with a sign that said "shuttle to Blankenberge" which passengers did not seem to head towards. When I got to the port terminal, I asked one of the staff who said we could take the coastal tram, but when I specifically asked about the buses that were there he asked the driver who said there were other shuttles to Blankenberge. We took the shuttle back to the ship and got on one of the other shuttles.
We were lucky because we just made it onto the train to Bruges- really cut it close. I bought train tickets while enroute on the bus. The shuttle stopped across the street from the train station and as all trains from Blankeberge stop in Bruges, we just needed to run for the only train there. In the end we were able to spend over 4 hours in Bruges which was a lovely way to end our cruise because it was our last port prior to disembarking the next day.