1. We sometimes use a semi-colon instead of a full stop or period. This is to separate sentences that are grammatically independent but that have closely connected meaning.
Note that in the above examples it is not correct to use a comma instead of the semi-colon.
2. Use a semi-colon as a kind of "super comma". When we have a list of items, we usually separate the items with commas. If the list is complicated, we may prefer to use semi-colons in some cases.