How can I make the player's arms look at the mouse position

I am making a gun and I want it when your holding the gun it will point your arms up/down depending where your mouse is and rotate entire character when dragged in the X direction but I never did anything like this so Im a noob at this.