Start with open ended questions, and let the patient speak initially - try not to interrupt. It should be like a funnel. Open initially, and then more closed once you're starting to get an idea of what's going on and you can ask more probing questions or clarifying questions as you go along. The other poster that mentioned summarizing is also a really good idea. Periodically, you can summarize what you've heard from the patient, like "it sounds like you're telling me that you've had this intermittent dull pain in your side for two weeks, it's better with x, worse with y, and ibuprofen seems to help. Does that sound about right?"
Also it's important to be systematic in how you take a history so you don't forget something, e.g. CC/HPI, ROS, PMH, PSH, FH, TobEtOH & Drug Use, Social History. You may not do the order the same way every time, because not every conversation is going to be the same - there will be some variation. You probably have a rubric of some kind that you're being graded with, so use that to your benefit to know what you must ask about. If you're systematic about it though, you'll be less likely to forget something.
There are a few textbooks on history taking and physical examination skills. Bates is pretty solid for physical exam - also check out the Stanford 25. They have a YouTube channel I think where they show how to do different physical examination skills. I think the most important thing to do is practice, practice, practice. How do you get better at auscultation? Listen to as many hearts and lungs as you can. How do you get better at doing an abdominal exam? Examine as many abdomens as you can. You're the one ultimately responsible for your education, so make the most of it.