Executing function

there is a function i want to have run right when the page loads. anyone know what the best code to use for this would be?