How Do You Open Files With Buttons

Hi, i'm new to these forums and i was wondering, what kind of script or code do you need to write in order to make a button open a specific file, such as a pdf or txt, and what code or script do you need to make a button open to another window that you designed?

i'm completely new to all this Delphi, C, C++ stuff and have no prior experience whatsoever. I am doing this as a personal project, so i can try and learn more about it and get better.