For introductory guidance, this type of question can be answered by reading the Processing reference, linked below:
And there are several tutorials on YouTube. You could start here:
And here:
Good luck!