How to use the cursor in scripting

I want to know how to execute commands that have something to do with the cursor. For example, character always facing the cursor or projectiles going towards the cursot etc. However i dont know how to use the cursor in scripting. thanks for your help

accessing mouse position :

Input-mousePosition

look at a object :

Transform.LookAt

check (mouse) input :

Input.GetKey

<< you need learn those documentation well , to doing that >>