A "viewing" means to have an open casket.
A "visitation" is when the body is laid out in the casket (which may be open or closed) before the service so that mourners may come to "visit."
A visitation offers a chance for people to "pay their final respects" to the deceased. Just as important, the visitation can be a time for mourners to meet and console each other in a more informal setting than at the funeral. Also when you choose a cremation with a memorial service the family may choose a visitation before the memorial service for family and friends to pay their final respects and to honor the deceased.
You can schedule a visitation for as little as a hour on the day of the service, or a four hour evening visitation.
The visitation can be restricted to just close friends and family, or be open to the public. You can even have a combination of private and public hours.
I