So let's say I have the following constraints:
$2a + 3b \leq 30$
$a + b \leq 15$
$a \geq 0$
$b \geq 0$
(I just made this problem up, so I'm not sure if it may make any sense when I graph it.)
Anyways, my question is that when it comes time to put the constraints onto a graph, how do I know which one is y and which one is x? Does it matter? For example, do I do $b = -a + 15$ or $a = -b + 15$ ? (This is being modeled after the $y=mx + b$ format.)

It does not matter which variable goes on which axis. The important thing is that you carefully examine your constraints and use the quantity to be maximized or minimized. Let me explain:
Say you have the following constraints in $a$ and $b:$
1) $100 \leq a \leq 200;$
2) $80 \leq b \leq 170;$
3) $b \geq 200 - a.$
You want to maximize the value of $P$ as defined as $P = 5b - 2a.$
Now you graph. For the purpose of demonstration, let $a$ go on the $y-$axis and $b$ go on the $x-$axis. We have intersections at the Cartesian points $(80, 120),$ $(80, 200),$ $(100, 100),$ $(170, 100),$ and $(170, 200).$
You must now translate these back into values for the original variables $a$ and $b.$ The graph is simply a tool to help you find possible critical points. For our case, we have these possible points:
1) $a = 120, b = 80;$
2) $a = 200, b = 80;$
3) $a = 100, b = 100;$
4) $a = 100, b = 170;$
5) $a = 200, b = 170.$
Plugging these pairs into the optimization equation, we find that $P$ is maximized when $\boxed{a = 170, b = 100}.$