How can i know when i can execute what functions of wordpress?

Install my plugin T5 WP Load Order. You get a long detailed list with all available hooks, files, constants, classes, functions and global variables – ordered by first appearance.

Whenever you’re in doubt create such a list for the page you are working on, and look up what you need.