In most legal jurisdictions, taking a rake from a poker table is explicitly illegal if the party taking the rake does not have the proper gaming licences and permits. The laws of many jurisdictions do not prohibit the playing of poker for money at a private dwelling, provided that no one takes a rake.
Rake is essentially a portion of winnings the host takes from cash poker games to offset the costs of facilitating the game. If you've ever played live games in a casino cardroom, you may have noticed the dealer taking chips out of the pot and setting them aside. That's the casino's rake.