the past simple is for actions that was completely done in the past , and you can indicate the time. i mean you can use last, yesterday, in the past, in 2001, ago or any indication of the past.
i did my homework an hour ago.
present perfect is used to indicate a link between the present and the past. the time of the action is before now but not specified, and we are often more interested in the result than the action itself.
i have done my homework.
she has swept the floor.
also you can use already, yet, just, never, ever, for and since with this time.