How to create a server action?

Can anybody please tell me how to add a button to the doctype ?

Check this out
Adding Custom Button To Form.

since I’m very new to ERP I don’t know to to go to the desired file can you please help me out how to go to the desired file

Could you please advise what do you need this button to do?