How do you get into a black market and what do I do once inside
There is a guide done by IGN which has a video as well as text instructions on how to achieve Robbing all black markets.
Here is a direct link to the video
Edge of the World
Upstairs to the right of the black market you see an infested building. Make your way all the way to the top where the Nestkeeper is. In a glass aquarium is the black market key. Jump down from the window, turn right and enter the black market from Mindy's yard
The Clockwork Mansion
Enter the train station through the roof and steal the Whale Oil Tank inside. Walk through the wall of light turn right and leave the Oil Tank in front of the black market stairs for now. Look up in front of the stairs and find a way to get to the balcony at the top. Go all the way down into the basement where two women plan to blow up the wall. Listen to their conversation and take them out. Now take the gate key on the shelf and get your third Whale Oil Tank that you left upstairs. Put it next to the other two downstairs and blow up the wall. That's it for black market robbery number two.
The Royal Conservatory
Go inside the black market that which is located in the first building to the left. Just before you go to the shopkeeper, you see a gated window on your left. Shoot the red cable and grab the wheel that is just a few steps from the window. Take the wheel to the canal. Next to the big gate you can place the wheel and open it. Swim through and climb the chain to your next black marked rob. Dust District
Next to the black market in Dust District downstairs, there is a small crack that you can crawl through. Go through it and turn left. Through one of the gated windows you can see a blocked door. Shoot the barricade, walk into the black marked and enter the room you just opened. Look for a calender at the wall and look for the circled number in the 4th row. The code for the black market always starts with 4 and the last two numbers are the ones circled in row 4.
The Grand Palace
Get a code from the back of the Winslow store and use it at the gate left from the store. Steal the boat key from a woman that i leaning there and backtrack to the harbor. Inside the shipe you can listen to an audiograph that gives you access to the black market. Return to the woman you just took the key from and get access to the black market door next to her.
Death to the Empress
To the left of the Courier early on in the mission, you can get through an almost blocked up alley. Turn right and smash the bottles on the shelf to get the warehouse key. Go to the black market next to the courier, exit through the back door and jump down to find the warehouse gate. Climb up the chain and your last black market robbery is done.