If the function is simple, functions such as #sinx# and #cosx# are defined for #(-oo,+oo)# so it's really not that hard.
However, as x approaches infinity, the limit does not exist, since the function is periodic and could be anywhere between #[-1, 1]#
In more complex functions, such as #sinx/x# at #x=0# there is a certain theorem that helps, called the squeeze theorem. It helps by knowing the limits of the function (eg sinx is between -1 and 1), transforming the simple function to the complex one and, if the side limits are equal, then they squeeze the answer between their common answer. More examples can be seen here.
For #sinx/x# the limit as it approaches 0 is 1 (proof too hard), and as it approaches infinity:
#-1<=sinx<=1#
#-1/x<=sinx/x<=1/x#
#lim_(x->oo)-1/x<=lim_(x->oo)sinx/x<=lim_(x->oo)1/x#
#0<=lim_(x->oo)sinx/x<=0#
Due to the squeeze theorem #lim_(x->oo)sinx/x=0#
graph{sinx/x [-14.25, 14.23, -7.11, 7.14]}