When approaching professors from your institutions make sure to be clear with yourself about the quality of work you produced and the depth of the interactions you had with them. Did you ask professors for feedback? Did you go to office hours and seek greater understanding? These types of interactions seem to typify what a healthy, supportive letter arises from.
After you are sure you would receive a strong letter of recommendation, either send an email or ask in person whichever works more naturally in your situation and explain what you are trying to do, that you would be grateful for their support, and tell them when the deadline is. Typically a month or greater is optimal to ask for a letter, bu never ask with less than two weeks to go. Professors are incredibly busy and it may result in at best a rushed letter and at worst one never getting submitted.
Keep professors kindly reminded of the due dates as they approach. When all letters are submitted take time and send emails to thank everyone who supported you. All of these people supporting you are your personal and professional network and it is important to stay humble and appreciative.