To download a Ugoira, use the "Save as video (right click and save)" link beneath the image. This is a WebM conversion that can be played on regular video players, but is not lossless in quality.
To upload a Ugoira, paste the Pixiv URL into the source field on the upload page, or upload using the bookmarklet. Uploading a Ugoira file from your computer will not work.
Ugoira is a custom format exclusive to Pixiv. Animations from other sites cannot be Ugoira.