Smuggling in Elite is a fun activity for young and old. The basics are: Get something you're not supposed to have and don't get caught with it.
To enter a station in a system where some of your cargo or passengers are considered illegal, make sure to approach the stations lined up with the mail slot (entrance) straight out of supercruise, then:
Once you're inside the station, you've made it (this time).
Illegal Cargo can either be acquired when accepting some missions, like when you transport Imperial Slaves to Federation space. By the way, if you were wondering, these go in your cargo hold, not in a passenger cabin.
Some passengers, like criminal master minds, really don't like being scanned by the authorities.