When you've made a mistake and it was bad enough that you're worried it will impact your future chances at getting hired, there are several things you can do to help mitigate the damage:
- First, always be honest. This doesn't mean you have to tell everyone all the bad things you've ever done. It just means, don't lie. If you were fired for moonlighting, don't tell people you quit because you wanted to travel the world.
- When asked, focus on what you've learned. Inevitably, in an interview, people may ask why you left a specific position. Don't just tell them you were fired - be prepared to explain what you've learned, and how you've changed. Be ready to show this through results (ie if you were fired for a specific reason, hopefully you now have some other job experience after that point where you can show that you didn't keep repeating the same mistake).
- Be prepared to explain results in a potential background check. Background checks will vary from employer to employer and region to region, but generally they will check employment history - a recruiter who receives a questionable result may follow up with you - be ready to answer in line with my first two points - be honest, but show how you've changed. Don't get caught off guard by these questions.
If you're having trouble finding employment because of a serious offence in your past, consider looking for assistance. In many nations, there are "back to work" programs designed to help people with criminal histories become productive employees. It's hard to give specific feedback on this without knowing your location and/or what you did in the past to get you fired, though.