I have never published a paper before but I am wondering in the case of a collaboration, how this collaboration should be acknowledged to the reader in different situations.
Specifically, I am wondering whether there is an (internationally accepted?) “rulebook of academic etiquette” with a set of rules regarding questions such as:

If person A has contributed more than person B to a paper, how should this be made clear to the readers?

If person A has contributed more than person B, where is the line between B being recognized as a coauthor, or simply thanked in the acknowledgements?

If person A has supplied all the theoretical/mathematical analysis, and person B all the empirical analysis in a paper, how should this be communicated to the reader?
Are there standardized rules about questions like this? If so, is there some kind of resource I could consult?