Please use the Simple Questions thread, which is stickied at the top of this forum for questions like that in the future.
The secret ID is, unlike your normal trainer ID, hidden.
Just as the trainer ID you can see on your trainer card, this ID is used for certain actions in the game.
For example, it is kind of a "protection" for Pokémon. If a person has the same name and visible ID as you do, the game will still recognize the traded Pokémon as your own if you trade Pokémon with said person, and not his, just because of that ID.
There is only a very small to no chance that those IDs will be the same.
That's only one function of it, though.
~closed~