The key point of the GPL is that it's "sticky." If you use GPL-licensed software in a modified form or incorporate it into your product, you have to make it available under the same terms. You can sell the software, but you also have to make its source code freely available.
The AGPL is even stickier than the GPL. Its stickiness extends to code which runs on servers, even if it's never published.