Yes, two people with Xbox Live accounts can play together—but the requirements depend on the mode.
For online play: Two subscriptions required. For couch co-op: Usually one. Always verify the specific game's requirements.