That depends.
If you want an address that can receive bitcoins, but nobody will ever be able to spend any of those bitcoins at all, then you can start with the characters that you want "CUSTOMADDRESSXXX...", put a 1 in front of it, and calculate the checksum.
Voila, you have a valid bitcoin address, and any bitcoins sent to the address are permanently unspendable.
If you want an address that can receive bitcoins, and you want to be able to spend the bitcoins that are received at that address, then you must randomly generate addresses from private keys and compare the resulting addresses to the string that you want until you get lucky and stumble across an address with a string you want.
Voila, you have a valid bitcoin address, and you can spend the bitcoins received at the address.
Note: It is impossible to create your example address. The letter O is not a valid bitcoin base58 character. If you use the number 0 instead of the letter O, then the resulting address would be valid: CUST0MADDRESSXXX...
Thank you, I understand crearly, and I have made!