Say the function you are integrating is ##f(x) \geq 0##, and you are integrating from x=a to b. If you can find a function ##g(x)## such that ##f(x) \leq g(x)## for ##a \leq x \leq b##, then the inequality holds even when you integrate over the functions. That is, if ##0 \leq f(x) \leq g(x)##, then
$$0 \leq \int_a^b dx~f(x) \leq \int_a^b dx~g(x).$$
Say you know f(x), but you don't know whether or not the integral over f(x) converges. But, suppose you suspect if converges. If you can find a function g(x) that is greatly than f(x) on the integration region, and you can show that the integral over g(x) converges, then you know that the integral over f(x) converges. However, not that if the g(x) you choose diverges when integrated, it doesn't tell you anything about whether or not the integral over f(x) diverges, because the integral over f(x) could be a finite number while still satisfying the inequality ##\int dx~f(x) < \int dx~g(x) = \infty##. So, you either have to choose a better comparison function that is 'closer' to your actual integrand, or you may have to consider that the integral diverges and you should check that with the next test.
Similarly, say you know g(x), but you don't know whether or not the integral over g(x) converges. But, suppose you suspect if diverges. If you can find a function f(x) that is less than g(x), and you can show that the integral over f(x) diverges, then you know the integral over g(x) diverges. However, if the integral over f(x) converages, it doesn't tell you if the integral over g(x) diverges or not.
Choosing an appropriate function to compare your integrand to is a matter of experience, in some sense. Typical things to try are cutting out factors in the denominator (e.g., if you integrand were x/(x+1), then you know that making the denominator smaller results in a larger overall number, so if we cut out the 1, we know that x/(x+1) < x/x = 1. Note that in this example the constant 1 would be a bad comparison function because if we integrate out to infinity we know the integral diverges and it wouldn't tell us anything about x/(x+1).)
In particular, it helps if you can find a comparison function for which you know the antiderivative. For a simple example problem, consider your first integral,
$$\int_0^\infty dx~\frac{x}{x^3+1}.$$
Can you find a function which is greater than your integrand, but whose antiderivative you know, using the hints I mentioned above?