If $f:\Sigma^* \to \Sigma^*$ is function, and $\exists$ a Turing machine which on the input $w\in\Sigma^*$ writes $f(w)$, $\forall w\in\Sigma^*$, then we call $f$ as computable function.
But in general when a talk about a function from some domain like $\mathbb{N}$, set of all graphs, etc., is computable, what it mean exactly in terms of turing machine and encodings? I mean when we encode an element from domain of the function we may have two different strings in $\Sigma^*$ represent the same element of the domain and some string may not represent an element from the domain at all, so how we rigorously define computability of $f$?
When we define a model of computation, depending on the model there will be some kind of "basic object".
For Turing machines, the basic objects can be taken to be strings on $\{0,1\}$.
For register machines, the basic objects can be taken to be natural numbers
However, there is a very standard way to use a general model of computation to "compute" other things. To do this, we need to represent objects of our new type $T$ via elements of the set $B$ of basic objects. This is also called encoding and numbering.
There are two dual ways to approach this problem, via representations and via numberings. A key point is that the representation functions and numbering functions are not themselves "computable" by the model of computation. The purpose of these functions is to translate other objects into a form that the model of computation is able to work with, and then translate the results of the model of computation once it is finished computing.
Representations
If $B$ is our set of basic objects and $T$ is the set of things we now want to compute with, a representation is a function $f\colon T \to B$.
We say that a function $G \colon T \to T$ is computable relative to the representation $f$ if there is a computable function $\phi \colon B \to B$ so that, for all $x \in T$, $$ \phi(f(x)) = f(G(x)). $$
Intuitively, this says: To compute $G(x)$, first translate $x$ to a basic object $f(x)$ then run $\phi$ on $f(x)$. The result will be the representation of the element $G(x)$ that we wanted to compute.
Note that the definition of a representation does not require $f$ to be surjective, only that it be defined on all of $T$.
The concept of a representation can be generalized so that the same object may have more than one representation. Now we just require $f$ to be a multifunction from $T$ to $B$, so that for each $x \in T$ we have a nonempty set $f(x)$ of basic elements that each represent $x$. We now require that, for all $x \in T$, $$ (\forall z \in f(x))[ \phi(z) \in f(G(x))]. $$
Example
Suppose we want to compute a function from finite graphs to finite graphs. We can make a representation of a finite graph $G = (V_G, E_G)$ by sending $G$ to the pair $(n, e, m)$ where $n = |V_G|$, $e = |E_G|$, and $m$ is a binary string of length $m\cdot e$ that tells whether each vertex is incident to each edge. We can represent $(n,e,m)$ as a binary string or a natural number as we desire.
Similarly, we can represent the collection of integers by mapping an integer $p$ to a pair $(n,m)$ of natural numbers so that $p = n-m$. This is an example where we could let the representation be a multifunction.
We can also extend representations to higher types. For example, via standard oracle computation methods, we can use our basic model of computation to compute functions that take an infinite binary sequence as input and produce an infinite binary sequence as output. Then, using representations, we can use these oracle computations to compute functions from $\mathbb{R}$ to $\mathbb{R}$, etc.
One reference on representations is: Klaus Weihrauch (2000), Computable analysis, Springer, ISBN 3-540-66817-9
Numberings
The dual concept of representation is numbering. A numbering is a partial surjective function $h \colon B \to T$. We say that a function $G \colon T \to T$ is computable relative to a numbering $h$ if there is a computable function $\phi$ so that, for all $z \in T$ and all $x \in B$ with $h(x) = z$, we have $$h(\phi(x)) = G(z).$$ Intuitively, this says that if I have a name $x$ for some element $z = h(x)$, then to compute $G(z)$ I can just compute $\phi(x)$, and this will be a name for $G(z)$.
The idea of numbering is the dual of the idea of representation. For example, with our graph representation above that takes $(V_G, E_G)$ to $(v,e,m)$, the corresponding numbering would take a basic object $b$, attempt to view $b$ as a triple $(v,e,m)$, and return the appropriate graph. If $b$ does not encode a triple of that form, then the numbering will not give a value for $b$ - this is why the numbering may be a partial function. However every element of $T$ has some name, so the numbering will be surjective.
Numberings are a very classical topic in computability. One reference is "Theory of Numberings", Yuri L. Ershov, in Handbook of Computability Theory (1999), E.r. Griffor (ed.), Elsevier.