I have not been a very good student while attending college. Whenever attendance was not mandatory I would probably miss class. My grades were a lot better than people attending every day but it has been cases I attended only few times a class over the entire semester. But my GPA has been 3.8 and did a double major (Both were science majors, 20 credits a semester, in a reputable school).
It sounds like you were a very good student in some ways: first, a 3.8 GPA is excellent. Second, to get those kinds of grades while rarely attending class except when it is required demonstrates a talent in learning and understanding independently: this is very beneficial for graduate school. On the other hand, if you are rarely showing up for class, you are missing most of the benefit of being enrolled in a university. Moreover, a class that you can mostly ace without showing up for might be the right class for a student who is trying to get a degree with minimal effort; it is exactly the wrong class for a student who wants to pursue a professional academic career. The vast majority of students who are going to the very top programs have all of your talent and are using their time as undergraduates to dramatically increase their knowledge and skills.
But I am sure that all of them don't think high of me, in terms of achieving a master's degree.... I went to office hours and was respectful of them. The problem is that I did not act in a very professional manner towards them. I had many personal issues and was still discovering myself at the time, but this is all excuses nobody will understand.
I'm not sure that your old professors do not think highly of you, professionally speaking, and you haven't said enough to explain why you think that. I would describe a large percentage of the undergraduate students I've interacted at with as "respectful but not very professional". Most faculty figure out pretty quickly that they can't expect 18-22 years young adults to behave according to the professional standards of academia (or other adult, professional life). Someone who is 20 years old, intelligent and successful in their coursework but somewhat unprofessional has a good chance to become a 25 year old graduate student who is intelligent, successful in their research and more professional. When it comes to evaluating undergraduates, when tend to look for unprofessionalism and immaturity that impedes their studies and acquisition of the material.
I agree with Brian Tompsett that a large range of suboptimal student behaviors will not factor into recommendation letters (though some will). I think the real problem is not that you necessarily have "burned bridges" with your instructors (although I don't know exactly what you did...) but rather that you failed to cultivate positive relationships with them outside of the classroom. As far as I can see, you have a good shot at getting routinely-good letters from your professors: the kind of letter that says that the student did well in the courses they took, as evidenced by their very high grades....and doesn't say much else. These kind of letters, written by faculty at a reputable institution, ought to get you into a graduate program somewhere, but in my experience will leave you far short of the top places (the Ivy League and others of the same caliber).
Here are (necessarily brief) answers to your questions:
First of[f], how will I manage to ask a professor to write a recommendation letter for 5 colleges I am intending to apply to?
You should begin by composing an email briefly explaining that you are applying to graduate programs and X and would like a recommendation letter. Let the email sit for a day or two and then reread it to make sure that it doesn't sound weird. Then send it. Don't overthink this.
Does it make a difference for the professor what school I am applying to (ivy league or not)?
In my field (mathematics), faculty usually write just one letter and send it to everyone. If they have a substantial professional relationship with faculty at one or more of the institutions being applied to, they might separately contact their, um, contacts at these places, or they may in turn be contacted by them. That's about it. The job of the "one letter" is to calibrate rather precisely the student's potential. For instance, I recently wrote a letter for a student in which I meant to indicate (without saying it in so many words) that they should be a strong candidate for admission at a top 20 program but less so for a top 10 one.
What criteria should I use when picking the professors that will write a good recommendation?
There are whole questions on this site about this, but: you want to strike a good balance between someone who (i) knows you well, (ii) has good things to say about you and (iii) has a status in the academic community that lends weight to what they say. In practice, students who have not been very mindful about cultivating strong relationships with their instructors end up in a situation in which the number of faculty members who could possibly write such a letter is not much larger than the number of letters needed, so it's not such a difficult task.
I live in a different country at the moment. Should I go and meet them in person to ask for this?
It's really up to you, but to my mind this is not worth a serious or long trip. If your email communications are not resulting in faculty agreeing to write letters, maybe reevaluate.
I burned a few bridges, but how can I influence their opinion at this point and show them how much I have grown after college and how much better I have become and it is partially thanks to them?
To be honest, I don't think there's that much spin you can put on the situation at this point. The faculty are writing based on their past interactions with you as an undergraduate, not based on the person you are now or who you aspire to be (there are already parts of the application for you to address that). If you have subsequent academic work or accomplishments, you should certainly convey that to them, but if you're asking how to talk them into writing you a stronger letter...Sorry, I don't think you can.