How two elements relate in this poset? I have encountered a relation that I couldn't really get my head around it and understand what it does.
The relation is on the set of partial functions from a set S to a set T:
$f \le g \Leftrightarrow \operatorname{dom}(f) \subseteq \operatorname{dom}(g)$, and $s \in \operatorname{dom}(f)$ implies that $fs=gs$
I'm not sure but I think this relates the same partial function 
and what are the maximal and minimal elements of this poset? Is it the same function?
Thank you 

Recall that a partial function $f: S\nrightarrow T$ is a function such that $\operatorname{dom}(f)\subseteq S$, whereas typical functions take $S$ to be domain. Onto your poset:
Let $A$ be your set of partial functions of the above form, and define a partial ordering on $A$ in the following way. 

For any two partial functions $f,g\in A$ such that 
  
  
*
  
*$\operatorname{dom}(f) \subseteq \operatorname{dom}(g)$, and
  
*For all $s\in\operatorname{dom}(f)$, $f(s) = g(s)$
  
  
  we say that $f\le g$. 

You can think of functions related in this way as subfunctions, where if $f\le g$, then $f$ is the same function as $g$, but you're just mapping fewer elements from $S$ over to $T$. Therefore, a minimal element of $A$ would be a function that maps the fewest elements -- namely, the function that maps nothing! Note that this is also the least element in your poset.
The maximal elements are similar, but not exactly analagous. Note that a partial function may not be a function if its domain were extend to all of $S$ (e.g. the function $f:\mathbb{R}\to\mathbb{R}$ defined by $x\mapsto\frac{1}{x}$). Therefore, the maximal elements are partial functions $f:\operatorname{dom}(f)\to T$ such that for any $s\in S$, $f:(\operatorname{dom}(f)\cup\{s\})\to T$ fails to be a function. 
Edit: As @CiaPan's excellent answer points out, there are no largest elements in the case when $S$ and $T$ have more than a single element.
