You need to find out what it is doing? A common cause of this problem is running low on free memory. If this is not the cause, a CPU profiler is needed. VisualVM comes free with the JDK and can do both for you.
only you can't profile the application all the time
When this is happening you can do an ad hoc profiling by calling jstack
multiple times a few second apart. You can use diff
of the stack traces to help you can find the thread which are likely to be busy and consuming CPU.