To get StreetPass data, you just have to have the StreetPass feature turned on for the game. You can have up to 12 games turned on for receiving StreetPass data at one time. You don't need the system on, or the cartridge for that game in the system.
If you want to send StreetPass data to another game, you'll need that game in your 3DS. Therefore, people you pass who give you Super Mario 3D Land data have that game in their system.
A discussion in a thread on Nintendo's forums put it this way:
You do not need to have the game on or even inserted into the system to recieve Streetpass content for that game. The 3DS will recieve up to three Streetpass data transmissions per game at a time, which you can see in the Notifications tab on the 3DS home screen. However, in order to automatically send data transmissions for a game, you must have the game inserted but not necessarily on.