Minimizing the latency of a software instrument (which determines its responsiveness to input from an external MIDI controller) is often a complex process. The greatest influence on latency is the audio buffer size. That setting determines how much audio is stored by the audio-interface driver before the audio is sent to the output. Large buffer sizes reduce the processor load; small buffer sizes reduce the latency. How to set the buffer sizes depends on your audio interface and the quality of its software drivers.
The computer's built-in audio drivers for all but the fastest systems seldom produce acceptable results. You should therefore plan to use a separate audio interface. Your MIDI interface and drivers may also affect latency, especially when intermediary software is needed for routing MIDI from the host to the plug-in.