Copying an exact site in a new wp installation


I was trying to copy an exact site i another site created by me from scratch, and i was trying to transfer diferent files from one to another but at the end the new site was APPARENTLY the same than the first one, but once i have started to click in some links it redirect me to the first site (the original). In fact if i tried to login in the second one it redirects me to the first one .

To sum up, i made a mess.

Could you help about which are the steps that i have to follow to copy a site in another site created from scratch.

Even if there is a plugin for that ( there is a plugin for everything), i would like to learn to do it by myself. Is there a guide, or could you give the steps here, if it is not too tough for you.

Thanks a lot