When you StreetPass someone, or Pass By when you have the PSS on either locally or online, you will send data out to various players. This information will be shared and allow players to access a variety of things. If you are StreetPassing, the game can only store 30 new players worth of information at any one time.
To activate StreetPass and the Passing By features, you just need to activate it in the BuzzNav when you receive it from Mr. Stone in Rustboro City. From then on, you will receive a variety of data whenever you StreetPass someone or Pass By someone locally or online. This can only be done once every eight hours or so, so you will only receive data for other players then and will need to wait for more.
source