If you're not at home when UPS delivers a package and it doesn't require a signature for the package then the UPS driver will leave the package at your door and then will update the tracking information that they left the package at your door or wherever they left the package.
If the package requires a signature then UPS will leave a door hanger on your doorknob saying they attempted delivery of the package but you were not there.
You can sign the door hanger which will be your signature to leave the package and the UPS driver will leave the package at your door the next day when they deliver packages.
Or the UPS driver will make another 2 attempts at delivery of the package and if you're not home after the 3rd attempt the UPS driver will return the package to the sorting facility and they will decide whether to send it back or try to redeliver it.
Most times after the 3rd attempt the package will be returned to sender but you can have the package held for delivery at a UPS location and then sign for it there.