How do canard flaps work?
The canard flap is like any other control surface in the trailing edge of a canard. The canard flaps are there mainly for trimming the aircraft. 

At transonic speeds, the center of pressure of the aircraft moves rearward, resulting in instability. This could be countered by trimming with the elevons; however, this increases the angle of attack (the elevon deflection in XB70 was between $0^{\circ}$ and $10^{\circ}$)- resulting in increased drag. The small flaps in the XB70's canard was used to counter the movement of center of pressure without changing the main wings AoA, which eliminated the speed and range penalty due to increased drag.

Another advantage is during the landing. The landing attitude of delta aircraft is usually steep and fast compared to other aircraft. The deflection of canard flaps in the XB-70 pitched the nose up, enabling the elevons to be operated as trailing edge flaps- this helped the to keep the landing attitude shallower and speed, lower.

Actually, in case of XB-70, the canard was exclusively a trimming device- the longitudinal control was provided solely by the elevons.

During landing, the use of flaps cause a negative pitching moment- In aircraft with horizontal stabilizers, flap deployment may increase the downward airflow on the horizontal tail, producing a pitch up moment. in case of aircraft without stabilizers, it is not possible. In order to trim the aircraft, the canard flaps in Saab Viggen were deployed; in case of Beechcraft starship, a variable sweep canard was used for the same purpose.

The main disadvantage of having flaps in canard was the increased complexity. The canard can in itself be used to provide the required trim; the flaps are used only when the canard is highly loaded and may not have sufficient spare lifting capacity to accommodate large movements of the centre of pressure or of the centre of gravity. Note that in case of XB-70, initially, the canard was fixed and the flaps were adjustable; later the canards were made trimmable with the flap deflection set at two positions- $0^{\circ}$ and $20^{\circ}$.

References: WarbirdTech: North American XB-70A Valkyrie by Dennis R. Jenkins and Tony Landis; Summary of Preliminary Data Derived from the XB-70 Airplanes by William H. Andrews, NASA Technical Memorandum TM X-1240