You need an outgoing trunk. More on that in the next paragraph. In Asterisk, you need to configure the trunk, make it part of a trunk-group, and then configure your dialplan to provide a trunk-group access code (usually 9, if you’re in North America). To use it, you would dial the trunk access code and the outside number you want to call.
To configure a trunk, you either need a hardware interface to an analog telephone line (an ATA with an FXO interface, or a Digium PC card such as the 410 with one or more FXO ports on it) or you need to subscribe to SIP termination service. You’ll find lots of SIP termination service providers, and you should do some comparison shopping. I use flowroute.com, but there are lots of them. When you set up an account, the provider will give you the necessary settings to configure their trunk in Asterisk. With a SIP termination provider, you don’t need any additional voice hardware, you connect with them via the Internet using your existing NIC, router, modem, etc.
For incoming calls, you want a SIP origination provider. When you set up the account, they will assign a telephone number and give you the Asterisk configuration details needed to configure the inbound service. I use DIDworldwide, but there are lots of SIP origination providers out there; shop around!