How can a piece of paper "in a column" to perform addition, subtraction, multiplication, and division with numbers of any length?
Exactly the same here. More precisely, there are two options - to use some library to work with huge numbers with huge accuracy, or write your own. Depending on tastes and preferences - up to the implementation of such a complete model "calculating machines".
Of course that's not counting the techniques that are used in calculations on a slide rule.
There are libraries for working with large numbers (bigdigits.c) that store the number in multi-byte arrays.
Restrictions on data types, and data types are introduced by the specification of the programming language.