Packaged Decks
Anki packages (.apkg files) enable you to import decks, notes, note types, and cards from other users. They are commonly shared on AnkiWeb.
Scheduling
Anki packages may also contain scheduling information, which is useful if you want to transfer decks between devices or profiles. However, when importing a deck shared by someone else, you typically do not want to adopt their card intervals or review history.
If you encounter imported cards with unexpectedly large intevals, the deck author may accidentally have included their scheduling information. You can use the Set Due Date feature to reset the imported cards. On Anki 23.10 and later, you can remove any scheduling information during the import process by leaving the "Import any learning progress" option unselected. This will also remove any "leech" or "marked" tags from the imported cards.
Updating
When you import an .apkg file, Anki will identify any notes in it that are already in your collection due to a previous import. If the notes in the file are newer than your local copy, the notes will be updated with the contents of the file by default.
This updating process is generally not possible if the note type is changed (e.g. if either you or the deck author do things like add an extra field to the note type). You will still be able to import any missing notes from the file, but notes you have imported previously will not be updated if the deck author has made changes.
Anki 23.10 and Later
Anki 23.10 introduced more flexibility: You can choose to unconditionally update notes and note types, always overwriting your modifications, or, on the other hand, never update existing objects.
Also, if both you and the deck author modified the same note type, you can now decide to merge the two versions. This will preserve all templates and fields contained in either one, but will require a full sync, and may mark other existing notes as modified.
Note to Deck Authors
Merging relies on template and field ids, which were introduced in Anki 2.1.67. If a template or field lacks an id, because it has been created with an earlier release, Anki attempts to find an equivalent by comparing names.
See this this add-on for why it is advantageous to share note types with field and template ids, and how to add them to existing ones.