If you're cleaning caulking off of something, I start with a scraper and try and get the edges to come clean. You can often then pull the caulking off like a string.
If you're trying to clean the caulk itself, soap and warm water should be enough. It sometimes gets stained/hard and then the best bet is to remove the worst of it and recaulk or paint over it if you're looking at trim.
A baking soda paste scrub will clean it up.
Mix a paste of bleach and baking soda. Apply, let sit for at least 5 minutes and scrub with a toothbrush.
Mechanical cleaning is important, one can’t just spray something on it and rinse it off and expect it to clean really dirty caulk.
What is on it?
Mold? If it is mold you need to really clean it probably two or three times with a mold cleaner and/or something like lime away.
Grease? If it is something like grease in the kitchen, then use something like Dawn detergent or another serious degreaser.
Rinsing all the chemicals and old dissolved soil’s is important.