If you use circular geofences, this is probably the most out-of-the-box way to get an Alert:
Create some location property (of type LOCATION) on your Thing (ThingTemplate);
Add an Alert to this property. Use "Deviation Below" and "Deviation Above" as Alert Type, to detect getting in and out of geofence, respectively. When you select those alert types, you can also specify the geofence center and its radius. Don't forget to put some overlap on the radiuses as some sort of hysteresis, to avoid getting into the situation when your alert turns on and off while the location fluctuates around the border;
Once you added Alerts for entering and exiting your geofences, you can subscribe to those by creating the corresponding Subscriptions (either on the same or on another thing). This is where you can put some business logic that should fire when the alert occurs;
Step (2) is something you can do programmatically (see AddOrUpdateAlert generic service), i.e. you can CRUD your geofence alerts from your services, no need to do it in the Composer.
We tried this method on one of the previous projects, and it worked well until we started encountering high volume of sensor data, after which it started generating intermittent errors, which were hard to debug. However, at that time we used ThingWorx 7.x, I guess it got better since then, so that still may be the viable way to go. At the end of the day we rewrote it with the following approach:
For the arbitrary geofences you will need to use the service suggested by @Velkumar in a DataChange subscription. It will probably be less performant (more math needs to be done), and you'll lose the (very useful) Alerts capability, but at the end of the day we found it somewhat more reliable.