Turret script

Help Plz. I really want to know how to make a turret game, where you can aim at enemies using the mouse or an object. Ive tried several times, but i just cant figure it out. I can’t make it rotate to “face” the cursor/object.