I am interested in showing that, given a set $S$ there exists a bijection between the set of all algebras of $S$, denoted $A$ and the set of all partitions of $S$, denoted $P$.
As a simple example, I considered the set $S=\{1, 2, 3\}.$ Then, the set of all partitions $P$ consists exactly of the the sets $$ \{\{1 \}, \{2\}, \{3 \}\}, \{\{1, 2\}, \{3\}\}, \{\{1\}, \{2, 3\}\}, \{\{2\}, \{1, 3\}\}, \{1, 2, 3\}.$$ I then computed the set of all algebra and found that it consisted of all the following sets: $$\{\emptyset, S\}, \{\{1\}, \{2,3\}, S, \emptyset\},\{\{2\}, \{1,3\}, S, \emptyset\}, \{\{3\}, \{1,2\}, S, \emptyset\}, 2^S.$$
It does seem like both sets have the same number of elements, but I am not sure how to construct the bijection in this case. One possible map that came to mind was the map $f:P\to A$, $$f:P\mapsto \{S, \emptyset\} \cup P$$ for all partitions except the one consisting of all the singleton, and for the later, $$f:\{\{x_0\}: x\in S\} \mapsto 2^S. $$ The map seems to be bijective in this case, but does it work for the general case? If not, what is the correct mapping?
As long as $S$ is finite, such a bijection does indeed exist and have a nice description. You're being slightly mislead by the case $S=\{1,2,3\}$ when you suggest your $f$, though; think e.g. about $S=\{1,2,3,4,5,6\}$ and the partition $P=\{\{1,2\},\{3,4\},\{5,6\}\}$.
Instead, you want the algebra generated by the elements of the partition $P$. This is just the smallest algebra containing $P$ as a subset; in particular, for the above $P$ it would be $$\{\emptyset, \{1,2\},\{3,4\},\{5,6\},\{1,2,3,4\},\{1,2,5,6\},\{3,4,5,6\},\{1,2,3,4,5,6\}\}.$$
Every partition gives rise to an algebra in this way. To go the other way, given an algebra $\mathcal{A}$ of subsets of a set $S$ we want to look at the partition of $S$ into minimal nonempty elements of $\mathcal{A}$ (called "atoms"). As long as $S$ is finite this always gives rise to a partition $P$ such that the algebra generated by $P$ is precisely $\mathcal{A}$; however, this can fail for infinite $S$.