Suppose their are n people and each person is friend with exactly m other people . What should be the relation between n and m for the following condition to hold and how to prove that .
For example - for m = 3 i.e a person can be friends with exactly 3 other people i think n should be multiple of four . I visualized it by considering group of people as corners of square and lines between them denoting friendship .
You are considering a graph with $n$ vertices, where each vertex has degree $m$. That is, you are considering a graph with a length $n$ degree sequence $(m,m,\cdots,m)$. I am assuming that a person cannot be friends with themselves, they cannot be 'twice' friends with another, and all friendships are reciprocal. Then you are considering undirected graphs without loops or multi-edges, i.e. simple graphs. Then consider the Erdős–Gallai theorem which tells you that a choice of $(n,m)$ works if and only if $nm$ is even, and $$\sum_{i=1}^k d_i \leq k(k-1) + \sum_{i=k+1}^n \min(d_i,k),$$ for each $k$ in $1\leq k\leq n$. But for $k\leq m$ this is just $$km\leq k(k-1)+k(n-k)$$ and for $m<k$ this is just $$km\leq k(k-1)+ m(n-k).$$
For $k\leq m$ this just says $m\leq (k-1)+(n-k)= n-1$ and for $m<k$ it says: $$km\leq k^2-k+mn-mk\implies m\leq \frac{k(k-1)}{2k-n}.$$
Additionally, we know that $nm$ is even, and thus one of $n$ and $m$ must be even (or both).
Also, using the Havel-Hakimi algorithm we can construct such a graph for $n=6$ and $m=3$ (contradicting your $4|n$ claim):
( I plotted that using this website )