You might consider taking the bus for the first leg of your trip...it's convenient and more comfortable, although it costs a little more.
You can get on the Greyhound/Peter Pan bus at the depot on Madison Street, near the corner of Beacon.
That'll take an hour to get to South Station, in Boston. (By the way, South Station is nice, and there are quite a few places to get lunch/snacks/coffee there.)
After you get off the bus, it's a five-minute walk (almost all indoors though) to get into the city subway system, on the Red Line. You'll have to read the maps for yourself.....but you'll need to hop on the Red Line until it intersects with the Blue Line, then take the Blue Line out to the airport.
I've ridden the Greyhound buses quite a few times, with good results, but I've never used the subway to get to the airport, so I couldn't tell you much about that. You can find the bus schedule at
www.greyhound.com, and I think the bus fare is around $12, as opposed to $5.75 for the commuter rail.