Here's the background: The government shutdown only affects agencies and employees that are funded through annual appropriations. But that doesn't apply to members of Congress. Salaries for members of the House and Senate are written into permanent law. (Members in both chambers currently make $174,000 a year.) That's why politicians get paid even in the event that Congress can't agree on a bill to fund the government.
It's a different story for congressional staffers. Individual members and committee chairs will decide which staffers are "essential" and need to stay on during the shutdown (with retroactive pay) and which staffers get sent home. The latter might get back pay later on, but that's up to Congress.
There's another twist, though. The current Congress can't actually stop itself from getting paid. That's because the 27th Amendment specifically says that the salaries of the House and Senate can't be altered until the start of a new term. The idea was to prevent members of Congress from handing themselves a raise before an election took place.
Some members of Congress have tried to find ways around the bad optics of the situation. Rep. Gary Peters (D-Mich.), for instance, has said he'll donate his salary to charity during the shutdown. "Michigan families work hard and when they don’t go to work, they don’t get paid, and the same should hold for Congress."*
Meanwhile, Sens. Barbara Boxer (D-Calif.) and Bob Casey (D-Penn.) have proposed a more lasting solution. They have a bill that would prevent any member of Congress from getting paid during a shutdown. (The Senate approved a similar bill in 2011, but the House never voted on it.) That bill likely couldn't take effect until after the next election, but it could come in handy if there's ever another shutdown in the future.
*Update: My colleague Ed O'Keefe is keeping a longer list of senators and representatives from both parties who say they'll donate their salaries to charity during the shutdown.