If you're talking about how to access a deployed contract outside the console, then; after you've deployed the contract you'll get back an address which is where the contract lives. In your code you then import the deployed contract ABI, set the web3 provider, and tell truffle contract to use the deployed contract address.
It'll be something like this:
var tc = require('truffle-contract')
var abi = require('./contract-abi.json')
var MyContract = tc(abi)
var instance = await MyContract.at('0x123...abc')
var result = await instance.myMethod()